Skip to content

[BUG] Fail to build on A3 #96

@raintBN-91

Description

@raintBN-91

I have already try this repo on A2 with no modifications needed.

But when build on A3, build.sh will report the below bug:

[ 97%] Building CXX object csrc/CMakeFiles/sgl_kernel_npu.dir/pytorch_extensions.cpp.o
In file included from /home/jiaozeyu/tmp/sgl-kernel-npu/csrc/cache_location_assign/op_host/cache_loc_assign.cpp:13:
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/utils/common.h:15:11: error: ‘uint32_t’ does not name a type
   15 | constexpr uint32_t BLK_SIZE_ALIN_FOR_INT64 = 4;
      |           ^~~~~~~~
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/utils/common.h:1:1: note: ‘uint32_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
  +++ |+#include <cstdint>
    1 | 
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/utils/common.h:16:11: error: ‘uint32_t’ does not name a type
   16 | constexpr uint32_t BLK_SIZE_ALIN_FOR_INT32 = 8;
      |           ^~~~~~~~
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/utils/common.h:16:11: note: ‘uint32_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/utils/common.h:18:8: error: ‘uint64_t’ does not name a type
   18 | inline uint64_t alinInt64Count(uint64_t count)
      |        ^~~~~~~~
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/utils/common.h:18:8: note: ‘uint64_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/utils/common.h:23:8: error: ‘uint64_t’ does not name a type
   23 | inline uint64_t alinInt32Count(uint64_t count)
      |        ^~~~~~~~
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/utils/common.h:23:8: note: ‘uint64_t’ is defined in header ‘<cstdint>; did you forget to ‘#include <cstdint>’?
[ 98%] Linking CXX shared module deep_ep_cpp.cpython-311-aarch64-linux-gnu.so

Finally result in:

/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/mla_preprocess/op_host/mla_preprocess.cpp:685:31: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘const uint32_t’ {aka ‘const unsigned int’} [-Wsign-compare]
  685 |     if (bIndex >= 0 && bIndex < MAX_SUPPORT_TOKEN_NUMS) {
      |                        ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/cache_location_assign/op_host/cache_loc_assign.cpp: In function ‘at::Tensor sglang::npu_kernel::getTiling(const at::Tensor&, uint64_t, uint64_t, uint32_t&, bool)’:
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/cache_location_assign/op_host/cache_loc_assign.cpp:47:42: error: ‘alinInt32Count’ was not declared in this scope
   47 |         tillingData->reqInxBufferCount = alinInt32Count(batchSize);
      |                                          ^~~~~~~~~~~~~~
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/cache_location_assign/op_host/cache_loc_assign.cpp:51:42: error: ‘alinInt64Count’ was not declared in this scope
   51 |         tillingData->reqInxBufferCount = alinInt64Count(batchSize);
      |                                          ^~~~~~~~~~~~~~
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/cache_location_assign/op_host/cache_loc_assign.cpp:55:41: error: ‘alinInt32Count’ was not declared in this scope
   55 |     tillingData->tokenCountAlignInt32 = alinInt32Count(MAX_STEP);
      |                                         ^~~~~~~~~~~~~~
/home/jiaozeyu/tmp/sgl-kernel-npu/csrc/cache_location_assign/op_host/cache_loc_assign.cpp:58:42: error: ‘alinInt64Count’ was not declared in this scope
   58 |     tillingData->offsetCountAlignInt64 = alinInt64Count(batchSize);
      |                                          ^~~~~~~~~~~~~~
gmake[2]: *** [csrc/CMakeFiles/sgl_kernel_npu.dir/build.make:107: csrc/CMakeFiles/sgl_kernel_npu.dir/cache_location_assign/op_host/cache_loc_assign.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
gmake[1]: *** [CMakeFiles/Makefile2:766: csrc/CMakeFiles/sgl_kernel_npu.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

And only "torch_memory_saver-0.0.8-cp311-cp311-linux_aarch64.whl" will be built.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions