Skip to content

Commit d95324a

Browse files
committed
refactor: replace header guards with #pragma once.
1 parent d1e10c7 commit d95324a

File tree

5 files changed

+6
-20
lines changed

5 files changed

+6
-20
lines changed

xllm/core/kernels/npu/custom_functions_npu/atb_common.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
1515

16-
#ifndef XLLM_CORE_KERNELS_NPU_ATB_COMMON_H
17-
#define XLLM_CORE_KERNELS_NPU_ATB_COMMON_H
16+
#pragma once
17+
1818
#include <dlfcn.h>
1919
#include <torch/library.h>
2020
#include <torch_npu/csrc/core/npu/NPUStream.h>
@@ -490,5 +490,3 @@ void run_atb_cmd(atb::Operation* op,
490490
const std::string& name);
491491

492492
} // namespace atb
493-
494-
#endif

xllm/core/kernels/npu/custom_functions_npu/operation_cache_compute.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
1515

16-
#ifndef XLLM_CORE_KERNELS_NPU_ATB_PARAM_OPERATION_CACHE_COMPUTE_H
17-
#define XLLM_CORE_KERNELS_NPU_ATB_PARAM_OPERATION_CACHE_COMPUTE_H
16+
#pragma once
1817

1918
#include <torch_npu/csrc/framework/OpCommand.h>
2019

@@ -144,5 +143,3 @@ uint64_t compute_hash(const std::string& name, Ts&... args) {
144143
}
145144

146145
} // namespace atb
147-
148-
#endif // XLLM_CORE_KERNELS_NPU_ATB_PARAM_OPERATION_CACHE_COMPUTE_H

xllm/core/kernels/npu/custom_functions_npu/operation_create.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
1515

16-
#ifndef XLLM_CORE_KERNELS_NPU_ATB_OPERATION_CREATE_H
17-
#define XLLM_CORE_KERNELS_NPU_ATB_OPERATION_CREATE_H
16+
#pragma once
1817

1918
#include <torch_npu/csrc/core/npu/NPUGraphsUtils.h>
2019
#include <torch_npu/csrc/framework/OpCommand.h>
@@ -123,5 +122,3 @@ OpParamCache<ParamType>::~OpParamCache() {
123122
}
124123

125124
} // namespace atb
126-
127-
#endif // XLLM_CORE_KERNELS_NPU_ATB_OPERATION_CREATE_H

xllm/core/kernels/npu/custom_functions_npu/utils.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
1515

16-
#ifndef XLLM_CORE_KERNELS_NPU_ATB_UTILS_H
17-
#define XLLM_CORE_KERNELS_NPU_ATB_UTILS_H
16+
#pragma once
1817

1918
#include <ATen/ATen.h>
2019
#include <acl/acl.h>
@@ -99,5 +98,3 @@ inline int get_op_mode(const MapType& mode_map,
9998
}
10099
} // namespace utils
101100
} // namespace atb
102-
103-
#endif

xllm/core/kernels/npu/ops_npu/npu_ops.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License.
1414
==============================================================================*/
15-
#ifndef XLLM_NPU_OPS_H
16-
#define XLLM_NPU_OPS_H
15+
#pragma once
1716

1817
#include "../custom_functions_npu/atb_common.h"
1918

@@ -52,5 +51,3 @@ void _npu_flash_attention(const at::Tensor& query,
5251
at::Tensor& out);
5352

5453
} // namespace atb
55-
56-
#endif // XLLM_NPU_OPS_H

0 commit comments

Comments
 (0)