From fe9d83795e3934f045de40d429ba979e07a3b4db Mon Sep 17 00:00:00 2001 From: statelesshz Date: Fri, 6 Dec 2024 08:11:53 +0800 Subject: [PATCH] pass lint check and fix typos --- CMakeLists.txt | 10 +++++----- _typos.toml | 2 ++ bitsandbytes/nn/modules.py | 1 - 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f0f1aa869..20dd2b45d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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" ) @@ -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() diff --git a/_typos.toml b/_typos.toml index 8ad7d5969..ff4c9ae06 100644 --- a/_typos.toml +++ b/_typos.toml @@ -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] @@ -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" diff --git a/bitsandbytes/nn/modules.py b/bitsandbytes/nn/modules.py index 0ae65dab2..781e22541 100755 --- a/bitsandbytes/nn/modules.py +++ b/bitsandbytes/nn/modules.py @@ -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)