Skip to content

Commit

Permalink
pass lint check and fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ji-huazhong committed Dec 6, 2024
1 parent 7ba303f commit fe9d837
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ elseif(BUILD_NPU)
list(APPEND SRC_FILES ${NPU_FILES})

set(SOC_VERSION "Ascend910B4" CACHE STRING "system on chip type")
set(ASCEND_CAN_PACKAGE_PATH $ENV{ASCEND_HOME_PATH} CACHE
set(ASCEND_CANN_PACKAGE_PATH $ENV{ASCEND_HOME_PATH} CACHE
STRING "ASCEND CAN package installation directory"
)

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

if(EXISTS ${ASCEND_CAN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
set(ASCENDC_CMAKE_DIR ${ASCEND_CAN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
elseif(EXISTS ${ASCEND_CAN_PACKAGE_PATH}/tools/tikcpp/ascendc_kernel_cmake)
set(ASCENDC_CMAKE_DIR ${ASCEND_CAN_PACKAGE_PATH}/tools/tikcpp/ascendc_kernel_cmake)
if(EXISTS ${ASCEND_CANN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
set(ASCENDC_CMAKE_DIR ${ASCEND_CANN_PACKAGE_PATH}/compiler/tikcpp/ascendc_kernel_cmake)
elseif(EXISTS ${ASCEND_CANN_PACKAGE_PATH}/tools/tikcpp/ascendc_kernel_cmake)
set(ASCENDC_CMAKE_DIR ${ASCEND_CANN_PACKAGE_PATH}/tools/tikcpp/ascendc_kernel_cmake)
else()
message(FATAL_ERROR "ascendc_kernel_cmake does not exist ,please check whether the can package is installed")
endif()
Expand Down
2 changes: 2 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[default]
extend-ignore-re = [
"@Ther-nul", # valid Github user
"CANN", # CANN (Compute Architecture for Neural Networks) is a heterogeneous computing architecture for Ascend NPU
]

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


[type.cuda.extend-words]
"subtile" = "subtile"
"subtiles" = "subtiles"
Expand Down
1 change: 0 additions & 1 deletion bitsandbytes/nn/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,6 @@ def npu(self, device: Optional[Union[int, device, str]] = None, non_blocking: bo
device = f"npu:{device}"
return self.to(device="npu" if device is None else device, non_blocking=non_blocking)


def xpu(self, non_blocking: bool = False):
return self.to(device="xpu", non_blocking=non_blocking)

Expand Down

0 comments on commit fe9d837

Please sign in to comment.