Skip to content

Commit fe9d837

Browse files
committed
pass lint check and fix typos
1 parent 7ba303f commit fe9d837

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ elseif(BUILD_NPU)
242242
list(APPEND SRC_FILES ${NPU_FILES})
243243

244244
set(SOC_VERSION "Ascend910B4" CACHE STRING "system on chip type")
245-
set(ASCEND_CAN_PACKAGE_PATH $ENV{ASCEND_HOME_PATH} CACHE
245+
set(ASCEND_CANN_PACKAGE_PATH $ENV{ASCEND_HOME_PATH} CACHE
246246
STRING "ASCEND CAN package installation directory"
247247
)
248248

@@ -251,10 +251,10 @@ elseif(BUILD_NPU)
251251
# file(GLOB KERNEL_FILES ${CMAKE_CURRENT_SOURCE_DIR}/csrc/npu_kernels.cpp)
252252
file(GLOB KERNEL_FILES csrc/npu_kernels.cpp)
253253

254-
if(EXISTS ${ASCEND_CAN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
255-
set(ASCENDC_CMAKE_DIR ${ASCEND_CAN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
256-
elseif(EXISTS ${ASCEND_CAN_PACKAGE_PATH}/tools/tikcpp/ascendc_kernel_cmake)
257-
set(ASCENDC_CMAKE_DIR ${ASCEND_CAN_PACKAGE_PATH}/tools/tikcpp/ascendc_kernel_cmake)
254+
if(EXISTS ${ASCEND_CANN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
255+
set(ASCENDC_CMAKE_DIR ${ASCEND_CANN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
256+
elseif(EXISTS ${ASCEND_CANN_PACKAGE_PATH}/tools/tikcpp/ascendc_kernel_cmake)
257+
set(ASCENDC_CMAKE_DIR ${ASCEND_CANN_PACKAGE_PATH}/tools/tikcpp/ascendc_kernel_cmake)
258258
else()
259259
message(FATAL_ERROR "ascendc_kernel_cmake does not exist ,please check whether the can package is installed")
260260
endif()

_typos.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
[default]
44
extend-ignore-re = [
55
"@Ther-nul", # valid Github user
6+
"CANN", # CANN (Compute Architecture for Neural Networks) is a heterogeneous computing architecture for Ascend NPU
67
]
78

89
[default.extend-identifiers]
@@ -11,6 +12,7 @@ extend-ignore-re = [
1112
"BA" = "BA" # used as a commented-out variable in tests
1213
"cann" = "cann" # cann (Compute Architecture for Neural Networks) is a heterogeneous computing architecture for Ascend NPU
1314

15+
1416
[type.cuda.extend-words]
1517
"subtile" = "subtile"
1618
"subtiles" = "subtiles"

bitsandbytes/nn/modules.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ def npu(self, device: Optional[Union[int, device, str]] = None, non_blocking: bo
320320
device = f"npu:{device}"
321321
return self.to(device="npu" if device is None else device, non_blocking=non_blocking)
322322

323-
324323
def xpu(self, non_blocking: bool = False):
325324
return self.to(device="xpu", non_blocking=non_blocking)
326325

0 commit comments

Comments
 (0)