Skip to content

Commit faf54b1

Browse files
author
zhangyue
committed
style(comments): wrap remaining technical identifiers in Markdown backticks
Scan-and-fix pass for identifiers in comments that still lack Markdown backticks, matching reviewer comments 9, 11, 13, 14 on PR #64. Applied only to files authored / modified by this PR (leaves custom/cmake/ config_envs.cmake and similar vllm-ascend-verbatim content untouched to stay consistent with the upstream it was adapted from). - `CMakeLists.txt`: `pybind11` (line 7). - `src/ascend/common.h`: `shape`, `strides`, `storage_shape`, `dtype` in the `AclTensorCache` class doc. - `src/ascend/custom/CMakeLists.txt`: `AscendC` toolchain reference. - `src/ascend/custom/build.sh`: `AscendC`, `libascend_kernel.so`. - `src/ascend/custom/cmake/config_ascend.cmake`: `SOC_VERSION`, `CANN`, `AscendC`.
1 parent c9a00a0 commit faf54b1

6 files changed

Lines changed: 16 additions & 16 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(InfiniOps LANGUAGES CXX)
44
set(CMAKE_CXX_STANDARD 17)
55
set(CMAKE_CXX_STANDARD_REQUIRED ON)
66

7-
# Internal variable to control pybind11's automatic optimization flags (like `-flto`).
7+
# Internal variable to control `pybind11`'s automatic optimization flags (like `-flto`).
88
set(PYBIND11_ENABLE_EXTRAS ON)
99

1010
# Options for backends.

src/CMakeLists.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ if(WITH_ASCEND)
178178
"ascend/*.cc"
179179
"ascend/*.cpp"
180180
)
181-
# Exclude kernel_impl.cpp — AscendC device code, not compiled by the host C++ compiler.
181+
# Exclude `kernel_impl.cpp``AscendC` device code, not compiled by the host C++ compiler.
182182
list(FILTER ASCEND_SOURCES EXCLUDE REGEX ".*kernel_impl\\.cpp$")
183183
# Exclude custom/ — standalone PyTorch extension, built separately.
184184
list(FILTER ASCEND_SOURCES EXCLUDE REGEX ".*/custom/.*")
@@ -218,7 +218,7 @@ if(WITH_ASCEND)
218218
"${ASCEND_HAL_LIB}")
219219

220220
# ATB (Ascend Transformer Boost) — provides fused operators like
221-
# PagedAttention and ReshapeAndCache that are graph-capture safe.
221+
# `PagedAttention` and `ReshapeAndCache` that are graph-capture safe.
222222
set(ATB_HOME_DIR "$ENV{ATB_HOME_PATH}")
223223
if(NOT ATB_HOME_DIR)
224224
# Default search path under CANN nnal directory.
@@ -240,12 +240,12 @@ if(WITH_ASCEND)
240240

241241
list(APPEND DEVICE_LIST "ascend")
242242

243-
# Custom AscendC kernels (PyTorch extension, requires torch_npu).
243+
# Custom `AscendC` kernels (PyTorch extension, requires `torch_npu`).
244244
if(BUILD_CUSTOM_KERNEL)
245245
add_subdirectory(ascend/custom)
246246

247-
# Link the compiled AscendC kernel objects into infiniops so that
248-
# custom kernel implementations (e.g. RmsNorm index 1) can call
247+
# Link the compiled `AscendC` kernel objects into `infiniops` so that
248+
# custom kernel implementations (e.g. `RmsNorm` index 1) can call
249249
# them via the generated launch functions.
250250
target_compile_definitions(infiniops PUBLIC INFINI_HAS_CUSTOM_KERNELS=1)
251251
endif()
@@ -373,8 +373,8 @@ if(GENERATE_PYTHON_BINDINGS)
373373
target_include_directories(ops PRIVATE ${PROJECT_SOURCE_DIR})
374374
target_link_libraries(ops PRIVATE infiniops)
375375

376-
# Custom AscendC kernel objects must be linked directly into ops
377-
# because the AscendC toolchain compiles host stubs with hidden
376+
# Custom `AscendC` kernel objects must be linked directly into ops
377+
# because the `AscendC` toolchain compiles host stubs with hidden
378378
# visibility — `libinfiniops.so` cannot re-export those symbols.
379379
# The `Operator<..., 1>` template instantiations that call
380380
# `aclrtlaunch_*` live in `ops.cc`, so link here with

src/ascend/common.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ inline aclTensor* buildAclTensor(const Tensor& t,
6565

6666
// Pre-computed tensor metadata for descriptor reuse.
6767
//
68-
// Stores shape, strides, storage_shape, and dtype once (avoiding per-call heap
69-
// allocations). The `aclTensor` descriptor is created on the first `get()`
70-
// call and its data pointer is updated in-place via `aclSetRawTensorAddr` on
71-
// subsequent calls.
68+
// Stores `shape`, `strides`, `storage_shape`, and `dtype` once (avoiding
69+
// per-call heap allocations). The `aclTensor` descriptor is created on the
70+
// first `get()` call and its data pointer is updated in-place via
71+
// `aclSetRawTensorAddr` on subsequent calls.
7272
class AclTensorCache {
7373
public:
7474
AclTensorCache() = default;

src/ascend/custom/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ file(GLOB OP_SRCS
5656
# Python side via `import ascend_kernel`.
5757
set(OP_PLUGIN_NAME ascend_kernel)
5858

59-
# Kernel side files (device code compiled by AscendC toolchain).
59+
# Kernel side files (device code compiled by `AscendC` toolchain).
6060
ascendc_library(no_workspace_kernel STATIC
6161
${PROJECT_OP_SRC_BASE}/rms_norm/op_kernel/rms_norm.cpp
6262
)

src/ascend/custom/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/bash
2-
# Build custom AscendC kernels into libascend_kernel.so.
2+
# Build custom `AscendC` kernels into `libascend_kernel.so`.
33
set -e
44

55
SOC_VERSION="${1:-Ascend910_9382}"

src/ascend/custom/cmake/config_ascend.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ endif()
66

77
set(ASCEND_CANN_PACKAGE_PATH ${ASCEND_HOME_PATH})
88

9-
# Auto-detect SOC_VERSION from `npu-smi info` if not set externally. Required
10-
# by CANN's `ascendc.cmake` for AscendC kernel compilation.
9+
# Auto-detect `SOC_VERSION` from `npu-smi info` if not set externally.
10+
# Required by `CANN`'s `ascendc.cmake` for `AscendC` kernel compilation.
1111
if(NOT DEFINED SOC_VERSION OR "${SOC_VERSION}" STREQUAL "")
1212
execute_process(
1313
COMMAND bash -c "npu-smi info 2>/dev/null | awk '/910B|910A|310/ {for (i=1;i<=NF;i++) if ($i ~ /^(910|310)/) {print \"Ascend\" $i; exit}}'"

0 commit comments

Comments
 (0)