快速体验fastllm安装部署并支持AMD ROCm推理加速

news2024/9/21 10:48:48

序言

fastllm是纯c++实现,无第三方依赖的高性能大模型推理库。

本文以国产海光DCU为例,在AMD ROCm平台下编译部署fastllm以实现LLMs模型推理加速。

测试平台曙光超算互联网平台SCNet

GPU/DCU异构加速卡AI 显存64GB PCIE(基于ROCm平台的GPU)

服务器的详细配置,请参考:曙光超算互联网平台SCNet之国产异构加速卡DCU

一、参考资料

fastllm 代码仓库:https://github.com/lcpu-club/fastllm-rocm

二、快速开始

1. fastllm功能概述

  • 🚀 纯c++实现,便于跨平台移植,可以在安卓上直接编译。
  • 🚀 ARM平台支持NEON指令集加速,X86平台支持AVX指令集加速,NVIDIA平台支持CUDA加速。
  • 🚀 支持浮点模型(FP32), 半精度模型(FP16), 量化模型(INT8, INT4) 加速。
  • 🚀 支持多卡部署,支持GPU + CPU混合部署。
  • 🚀 支持Batch速度优化。
  • 🚀 支持并发计算时动态拼Batch。
  • 🚀 支持流式输出,很方便实现打字机效果。
  • 🚀 支持python调用。
  • 🚀 前后端分离设计,便于支持新的计算设备。
  • 🚀 目前支持ChatGLM模型,各种LLAMA模型(ALPACA, VICUNA等),BAICHUAN模型,MOSS模型。

2. 测试环境

root@notebook-1823641624653922306-scnlbe5oi5-42808:/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/build# hipconfig
HIP version  : 5.7.24164

== hipconfig
HIP_PATH     : /opt/dtk/hip
ROCM_PATH    : /opt/dtk
HIP_COMPILER : clang
HIP_PLATFORM : amd
HIP_RUNTIME  : rocclr
CPP_CONFIG   :  -D__HIP_PLATFORM_HCC__= -D__HIP_PLATFORM_AMD__= -I"/opt/dtk/hip/include" -I"/opt/dtk/llvm/bin/../lib/clang/15.0.0" -I/opt/dtk/hsa/include

== hip-clang
HSA_PATH         : /opt/dtk/hsa
HIP_CLANG_PATH   : /opt/dtk/llvm/bin
clang version 15.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /opt/dtk/llvm/bin
AOMP-15.0-61 (http://github.com/ROCm-Developer-Tools/aomp):
 Source ID:15.0-61-595b0d8133fafef5742f7d39f8e6a07b31afff56
  LLVM version 15.0.0git
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: (unknown)

  Registered Targets:
    amdgcn - AMD GCN GPUs
    r600   - AMD GPUs HD2XXX-HD6XXX
    x86    - 32-bit X86: Pentium-Pro and above
    x86-64 - 64-bit X86: EM64T and AMD64
hip-clang-cxxflags :  -std=c++11 -isystem /opt/dtk-24.04/llvm/lib/clang/15.0.0/include/.. -isystem /opt/dtk-24.04/llvm/lib/clang/15.0.0/include/cuda_wrappers -isystem /opt/dtk/hsa/include -isystem /opt/dtk/hip/include -msram-ecc -msram-ecc -msram-ecc -O3
hip-clang-ldflags  : --driver-mode=g++ -L"/opt/dtk/hip/lib" -L"/opt/dtk/lib" -O3 -lgcc_s -lgcc -lpthread -lm -lrt

=== Environment Variables
PATH=/usr/local/bin:/opt/mpi/bin:/opt/hwloc/bin/:/opt/cmake/bin/:/opt/conda/bin:/opt/conda/bin:/opt/dtk/bin:/opt/dtk/llvm/bin:/opt/dtk/hip/bin:/opt/dtk/hip/bin/hipify:/opt/hyhal/bin:/opt/mpi/bin:/opt/hwloc/bin/:/opt/cmake/bin/:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/conda/bin
LD_LIBRARY_PATH=/usr/local/lib/:/usr/local/lib64/:/opt/mpi/lib:/opt/hwloc/lib:/opt/dtk/hip/lib:/opt/dtk/llvm/lib:/opt/dtk/lib:/opt/dtk/lib64:/opt/hyhal/lib:/opt/hyhal/lib64:/opt/dtk-24.04/hip/lib:/opt/dtk-24.04/llvm/lib:/opt/dtk-24.04/lib:/opt/dtk-24.04/lib64:/opt/hyhal/lib:/opt/hyhal/lib64:/usr/local/lib/:/usr/local/lib64/:/opt/mpi/lib:/opt/hwloc/lib:
HIP_PATH=/opt/dtk/hip

== Linux Kernel
Hostname     : notebook-1823641624653922306-scnlbe5oi5-42808
Linux notebook-1823641624653922306-scnlbe5oi5-42808 3.10.0-957.el7.x86_64 #1 SMP Fri Oct 25 22:34:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

3. 安装CLBlast

CLBlast: Building and installing

4. cmake编译

# 下载源码
git clone https://github.com/lcpu-club/fastllm-rocm.git

cd fastllm
mkdir build
cd build

# 设置环境变量
export ROCM_PATH="/opt/dtk"
export CLBlast_DIR="/usr/lib/x86_64-linux-gnu/cmake/CLBlast"

export CXXFLAGS="-I${ROCM_PATH}/include -Wno-pass-failed -D__HIP_PLATFORM_AMD__"

# cmake
cmake .. -DUSE_ROCM=ON -DCMAKE_CXX_COMPILER=/opt/dtk/llvm/bin/clang++
root@notebook-1823641624653922306-scnlbe5oi5-42808:/public/home/scnlbe5oi5/Downloads/cache/fastl
lm-rocm/build# cmake .. -DUSE_ROCM=ON -DCMAKE_CXX_COMPILER=/opt/dtk/llvm/bin/clang++
-- The CXX compiler identification is Clang 15.0.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/dtk/llvm/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- USE_CUDA: OFF
-- USE_ROCM: ON
-- PYTHON_API: OFF
-- USE_SENTENCEPIECE: OFF
-- CMAKE_CXX_FLAGS-I/opt/dtk/include -Wno-pass-failed -D__HIP_PLATFORM_AMD__ -pthread --std=c++17 -O3 -march=native
-- The HIP compiler identification is Clang 15.0.0
-- Detecting HIP compiler ABI info
-- Detecting HIP compiler ABI info - done
-- Check for working HIP compiler: /opt/dtk/llvm/bin/clang++ - skipped
-- Detecting HIP compile features
-- Detecting HIP compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HIP_CLANG_SUPPORTS_PARALLEL_JOBS
-- Performing Test HIP_CLANG_SUPPORTS_PARALLEL_JOBS - Success
-- System architecture is x86_64
-- Configuring done (5.1s)
-- Generating done (0.6s)
-- Build files have been written to: /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/build

5. make编译

单线程编译

root@notebook-1823641624653922306-scnlbe5oi5-42808:/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/bu
ild# make -j1
[  2%] Building CXX object CMakeFiles/fastllm.dir/src/fastllm.cpp.o
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:50: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:36: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:22: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                  ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:50: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:36: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:22: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                  ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:46: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
                                          ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:32: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
                            ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:18: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
              ~~ ^~~
9 warnings generated.
[  4%] Building CXX object CMakeFiles/fastllm.dir/src/device.cpp.o
[  6%] Building CXX object CMakeFiles/fastllm.dir/src/model.cpp.o
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:3:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:100:16: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
        return std::unique_ptr<fastllm::basellm> (model);
               ^
1 warning generated.
[  8%] Building CXX object CMakeFiles/fastllm.dir/src/executor.cpp.o
[ 11%] Building CXX object CMakeFiles/fastllm.dir/src/devices/cpu/cpudevice.cpp.o
[ 13%] Building CXX object CMakeFiles/fastllm.dir/src/devices/cpu/cpudevicebatch.cpp.o
[ 15%] Building CXX object CMakeFiles/fastllm.dir/src/models/chatglm.cpp.o
[ 17%] Building CXX object CMakeFiles/fastllm.dir/src/models/moss.cpp.o
[ 20%] Building CXX object CMakeFiles/fastllm.dir/src/models/llama.cpp.o
[ 22%] Building CXX object CMakeFiles/fastllm.dir/src/models/qwen.cpp.o
[ 24%] Building CXX object CMakeFiles/fastllm.dir/src/models/basellm.cpp.o
[ 26%] Building CXX object CMakeFiles/fastllm.dir/src/models/glm.cpp.o
[ 28%] Building CXX object CMakeFiles/fastllm.dir/src/devices/rocm/rocmdevice.cpp.o
[ 31%] Building CXX object CMakeFiles/fastllm.dir/src/devices/rocm/rocmdevicebatch.cpp.o
[ 33%] Building HIP object CMakeFiles/fastllm.dir/src/devices/rocm/fastllm-rocm.hip.o
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
4 warnings generated when compiling for gfx906.
4 warnings generated when compiling for gfx926.
4 warnings generated when compiling for gfx928.
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
4 warnings generated when compiling for host.
[ 33%] Built target fastllm
[ 35%] Building CXX object CMakeFiles/main.dir/main.cpp.o
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/main.cpp:1:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/main.cpp:64:18: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
    auto model = fastllm::CreateLLMModelFromFile(config.path);
                 ^
1 warning generated.
[ 37%] Linking HIP executable main
[ 37%] Built target main
[ 40%] Building CXX object CMakeFiles/quant.dir/tools/src/quant.cpp.o
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/quant.cpp:6:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/quant.cpp:49:18: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
    auto model = fastllm::CreateLLMModelFromFile(config.path);
                 ^
1 warning generated.
[ 42%] Linking HIP executable quant
[ 42%] Built target quant
[ 44%] Building CXX object CMakeFiles/testOps.dir/test/ops/cppOps.cpp.o
[ 46%] Linking HIP executable testOps
[ 46%] Built target testOps
[ 48%] Building CXX object CMakeFiles/webui.dir/example/webui/webui.cpp.o
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/webui/webui.cpp:4:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/webui/webui.cpp:76:18: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
    auto model = fastllm::CreateLLMModelFromFile(config.path);
                 ^
1 warning generated.
[ 51%] Linking HIP executable webui
[ 51%] Built target webui
[ 53%] Building CXX object CMakeFiles/benchmark.dir/example/benchmark/benchmark.cpp.o
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/benchmark/benchmark.cpp:5:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/benchmark/benchmark.cpp:82:18: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
    auto model = fastllm::CreateLLMModelFromFile(config.path);
                 ^
1 warning generated.
[ 55%] Linking HIP executable benchmark
[ 55%] Built target benchmark
[ 57%] Building CXX object CMakeFiles/apiserver.dir/example/apiserver/apiserver.cpp.o
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/apiserver.cpp:4:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/apiserver.cpp:231:8: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
struct WorkQueue {
       ^
1 warning generated.
[ 60%] Building CXX object CMakeFiles/apiserver.dir/example/apiserver/json11.cpp.o
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:251:58: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit JsonString(string &&value)      : Value(move(value)) {}
                                                         ^
                                                         std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:259:62: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit JsonArray(Json::array &&value)      : Value(move(value)) {}
                                                             ^
                                                             std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:267:64: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit JsonObject(Json::object &&value)      : Value(move(value)) {}
                                                               ^
                                                               std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:309:76: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    Json::Json(string &&value)             : m_ptr(make_shared<JsonString>(move(value))) {}
                                                                           ^
                                                                           std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:312:75: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    Json::Json(Json::array &&values)       : m_ptr(make_shared<JsonArray>(move(values))) {}
                                                                          ^
                                                                          std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:314:76: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    Json::Json(Json::object &&values)      : m_ptr(make_shared<JsonObject>(move(values))) {}
                                                                           ^
                                                                           std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:412:29: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
                return fail(move(msg), Json());
                            ^
                            std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:204:50: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit Value(T &&value)      : m_value(move(value)) {}
                                                 ^
                                                 std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:251:52: note: in instantiation of member function 'json11::Value<json11::Json::STRING, std::basic_string<char>>::Value' requested here
        explicit JsonString(string &&value)      : Value(move(value)) {}
                                                   ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:204:50: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit Value(T &&value)      : m_value(move(value)) {}
                                                 ^
                                                 std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:259:56: note: in instantiation of member function 'json11::Value<json11::Json::ARRAY, std::vector<json11::Json>>::Value' requested here
        explicit JsonArray(Json::array &&value)      : Value(move(value)) {}
                                                       ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:204:50: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit Value(T &&value)      : m_value(move(value)) {}
                                                 ^
                                                 std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:267:58: note: in instantiation of member function 'json11::Value<json11::Json::OBJECT, std::map<std::basic_string<char>, json11::Json>>::Value' requested here
        explicit JsonObject(Json::object &&value)      : Value(move(value)) {}
                                                         ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:204:50: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit Value(T &&value)      : m_value(move(value)) {}
                                                 ^
                                                 std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:272:22: note: in instantiation of member function 'json11::Value<json11::Json::NUL, json11::NullStruct>::Value' requested here
        JsonNull() : Value({}) {}
                     ^
11 warnings generated.
[ 62%] Linking HIP executable apiserver
[ 62%] Built target apiserver
[ 64%] Building CXX object CMakeFiles/fastllm_tools.dir/src/fastllm.cpp.o
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:50: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:36: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:22: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                  ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:50: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:36: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:22: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                  ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:46: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
                                          ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:32: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
                            ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:18: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
              ~~ ^~~
9 warnings generated.
[ 66%] Building CXX object CMakeFiles/fastllm_tools.dir/src/device.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/model.cpp.o
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:3:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:100:16: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
        return std::unique_ptr<fastllm::basellm> (model);
               ^
1 warning generated.
[ 71%] Building CXX object CMakeFiles/fastllm_tools.dir/src/executor.cpp.o
[ 73%] Building CXX object CMakeFiles/fastllm_tools.dir/src/devices/cpu/cpudevice.cpp.o
[ 75%] Building CXX object CMakeFiles/fastllm_tools.dir/src/devices/cpu/cpudevicebatch.cpp.o
[ 77%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/chatglm.cpp.o
[ 80%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/moss.cpp.o
[ 82%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/llama.cpp.o
[ 84%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/qwen.cpp.o
[ 86%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/basellm.cpp.o
[ 88%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/glm.cpp.o
[ 91%] Building CXX object CMakeFiles/fastllm_tools.dir/src/devices/rocm/rocmdevice.cpp.o
[ 93%] Building CXX object CMakeFiles/fastllm_tools.dir/src/devices/rocm/rocmdevicebatch.cpp.o
[ 95%] Building HIP object CMakeFiles/fastllm_tools.dir/src/devices/rocm/fastllm-rocm.hip.o
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9:/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
 warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip                                                    ^~~~~~~~~~~
:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
4 warnings generated when compiling for gfx926.
4 warnings generated when compiling for gfx928.
4 warnings generated when compiling for gfx906.
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
4 warnings generated when compiling for host.
[ 97%] Building CXX object CMakeFiles/fastllm_tools.dir/tools/src/pytools.cpp.o
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/pytools.cpp:78:42: warning: 'make_config' has C-linkage specified, but returns user-defined type 'fastllm::GenerationConfig' which is incompatible with C [-Wreturn-type-c-linkage]
    DLL_EXPORT fastllm::GenerationConfig make_config(int max_length, bool do_sample, float top_p, int top_k,
                                         ^
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/pytools.cpp:5:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/pytools.cpp:95:29: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
        models.models[id] = fastllm::CreateLLMModelFromFile(path);
                            ^
2 warnings generated.
[100%] Linking HIP shared library libfastllm_tools.so
[100%] Built target fastllm_tools

多线程编译

root@notebook-1823641624653922306-scnlbe5oi5-42808:/public/home/scnlbe5oi5/Downloads/cache/fastl
lm-rocm/build# make -j${nproc}
[  6%] Building CXX object CMakeFiles/fastllm.dir/src/fastllm.cpp.o
[ 17%] Building CXX object CMakeFiles/fastllm.dir/src/device.cpp.o
[  6%] Building CXX object CMakeFiles/fastllm.dir/src/model.cpp.o
[ 46%] Building CXX object CMakeFiles/fastllm.dir/src/executor.cpp.o
[ 46%] Building CXX object CMakeFiles/fastllm_tools.dir/src/fastllm.cpp.o
[ 48%] Building CXX object CMakeFiles/fastllm.dir/src/devices/cpu/cpudevice.cpp.o
[ 53%] Building CXX object CMakeFiles/fastllm.dir/src/models/chatglm.cpp.o
[ 55%] Building CXX object CMakeFiles/fastllm_tools.dir/src/device.cpp.o
[ 66%] Building CXX object CMakeFiles/fastllm.dir/src/devices/cpu/cpudevicebatch.cpp.o
[ 66%] Building CXX object CMakeFiles/fastllm_tools.dir/src/devices/rocm/rocmdevicebatch.cpp.o
[ 68%] Building HIP object CMakeFiles/fastllm_tools.dir/src/devices/rocm/fastllm-rocm.hip.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/model.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm.dir/src/models/moss.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/devices/cpu/cpudevice.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm.dir/src/models/basellm.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/executor.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/devices/cpu/cpudevicebatch.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm.dir/src/models/llama.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm.dir/src/models/glm.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm.dir/src/models/qwen.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/chatglm.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/moss.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/qwen.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/llama.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm.dir/src/devices/rocm/rocmdevice.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm.dir/src/devices/rocm/rocmdevicebatch.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/devices/rocm/rocmdevice.cpp.o
[ 68%] Building HIP object CMakeFiles/fastllm.dir/src/devices/rocm/fastllm-rocm.hip.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/glm.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/src/models/basellm.cpp.o
[ 68%] Building CXX object CMakeFiles/fastllm_tools.dir/tools/src/pytools.cpp.o
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/pytools.cpp:78:42: warning: 'make_config' has C-linkage specified, but returns user-defined type 'fastllm::GenerationConfig' which is incompatible with C [-Wreturn-type-c-linkage]
    DLL_EXPORT fastllm::GenerationConfig make_config(int max_length, bool do_sample, float top_p, int top_k,
                                         ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/pytools.cpp:5:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/pytools.cpp:95:29: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
        models.models[id] = fastllm::CreateLLMModelFromFile(path);
                            ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:50: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:36: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:22: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                  ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:50: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:36: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:22: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                  ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:46: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
                                          ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:32: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
                            ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:18: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:50: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:36: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:908:22: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                  ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:50: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:36: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                                ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1014:22: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
            blank += 226, blank += 150, blank += 129;
                  ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:46: warning: implicit conversion from 'int' to 'char' changes value from 129 to -127 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
                                          ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:32: warning: implicit conversion from 'int' to 'char' changes value from 150 to -106 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
                            ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:1286:18: warning: implicit conversion from 'int' to 'char' changes value from 226 to -30 [-Wconstant-conversion]
        blank += 226, blank += 150, blank += 129;
              ~~ ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:3:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:100:16: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
        return std::unique_ptr<fastllm::basellm> (model);
               ^
2 warnings generated.
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:3:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:100:16: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
        return std::unique_ptr<fastllm::basellm> (model);
               ^
1 warning generated.
4 warnings generated when compiling for gfx928.
1 warning generated.
4 warnings generated when compiling for gfx926.
4 warnings generated when compiling for gfx906.
4 warnings generated when compiling for gfx906.
4 warnings generated when compiling for gfx926.
4 warnings generated when compiling for gfx928.
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:30:17: warning: 4 enumeration values not handled in switch: 'HIPBLAS_STATUS_SUCCESS', 'HIPBLAS_STATUS_HANDLE_IS_NULLPTR', 'HIPBLAS_STATUS_INVALID_ENUM'... [-Wswitch]
        switch (code) {
                ^~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:81:9: warning: comparison of different enumeration types ('hipError_t' and 'hipblasStatus_t') [-Wenum-compare]
        checkHipErrors(stat);
        ^~~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:19:20: note: expanded from macro 'checkHipErrors'
    if (hipSuccess != (a)) { \
        ~~~~~~~~~~ ^  ~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1518:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", ret);
                          ~~   ^~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:1571:32: warning: format specifies type 'unsigned int' but the argument has type 'void *' [-Wformat]
    DEBUG_PRINT("hipFree: %x", rocmBuffers[i].data);
                          ~~   ^~~~~~~~~~~~~~~~~~~
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/devices/rocm/fastllm-rocm.hip:16:53: note: expanded from macro 'DEBUG_PRINT'
                                __LINE__, __func__, __VA_ARGS__); fprintf(stderr, "\n"); } while (0)
                                                    ^~~~~~~~~~~
4 warnings generated when compiling for host.
4 warnings generated when compiling for host.
9 warnings generated.
9 warnings generated.
[ 71%] Linking HIP shared library libfastllm_tools.so
[ 71%] Built target fastllm_tools
[ 71%] Built target fastllm
[ 77%] Building CXX object CMakeFiles/testOps.dir/test/ops/cppOps.cpp.o
[ 77%] Building CXX object CMakeFiles/benchmark.dir/example/benchmark/benchmark.cpp.o
[ 77%] Building CXX object CMakeFiles/main.dir/main.cpp.o
[ 86%] Building CXX object CMakeFiles/webui.dir/example/webui/webui.cpp.o
[ 86%] Building CXX object CMakeFiles/quant.dir/tools/src/quant.cpp.o
[ 86%] Building CXX object CMakeFiles/apiserver.dir/example/apiserver/apiserver.cpp.o
[ 86%] Building CXX object CMakeFiles/apiserver.dir/example/apiserver/json11.cpp.o
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:251:58: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit JsonString(string &&value)      : Value(move(value)) {}
                                                         ^
                                                         std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:259:62: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit JsonArray(Json::array &&value)      : Value(move(value)) {}
                                                             ^
                                                             std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:267:64: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit JsonObject(Json::object &&value)      : Value(move(value)) {}
                                                               ^
                                                               std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:309:76: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    Json::Json(string &&value)             : m_ptr(make_shared<JsonString>(move(value))) {}
                                                                           ^
                                                                           std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:312:75: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    Json::Json(Json::array &&values)       : m_ptr(make_shared<JsonArray>(move(values))) {}
                                                                          ^
                                                                          std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:314:76: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
    Json::Json(Json::object &&values)      : m_ptr(make_shared<JsonObject>(move(values))) {}
                                                                           ^
                                                                           std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:412:29: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
                return fail(move(msg), Json());
                            ^
                            std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:204:50: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit Value(T &&value)      : m_value(move(value)) {}
                                                 ^
                                                 std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:251:52: note: in instantiation of member function 'json11::Value<json11::Json::STRING, std::basic_string<char>>::Value' requested here
        explicit JsonString(string &&value)      : Value(move(value)) {}
                                                   ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:204:50: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit Value(T &&value)      : m_value(move(value)) {}
                                                 ^
                                                 std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:259:56: note: in instantiation of member function 'json11::Value<json11::Json::ARRAY, std::vector<json11::Json>>::Value' requested here
        explicit JsonArray(Json::array &&value)      : Value(move(value)) {}
                                                       ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:204:50: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit Value(T &&value)      : m_value(move(value)) {}
                                                 ^
                                                 std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:267:58: note: in instantiation of member function 'json11::Value<json11::Json::OBJECT, std::map<std::basic_string<char>, json11::Json>>::Value' requested here
        explicit JsonObject(Json::object &&value)      : Value(move(value)) {}
                                                         ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:204:50: warning: unqualified call to 'std::move' [-Wunqualified-std-cast-call]
        explicit Value(T &&value)      : m_value(move(value)) {}
                                                 ^
                                                 std::
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/json11.cpp:272:22: note: in instantiation of member function 'json11::Value<json11::Json::NUL, json11::NullStruct>::Value' requested here
        JsonNull() : Value({}) {}
                     ^
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/quant.cpp:6:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/tools/src/quant.cpp:49:18: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
    auto model = fastllm::CreateLLMModelFromFile(config.path);
                 ^
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/main.cpp:1:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/main.cpp:64:18: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
    auto model = fastllm::CreateLLMModelFromFile(config.path);
                 ^
[ 88%] Linking HIP executable testOps
1 warning generated.
[ 91%] Linking HIP executable quant
[ 91%] Built target testOps
1 warning generated.
[ 93%] Linking HIP executable main
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/benchmark/benchmark.cpp:5:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/benchmark/benchmark.cpp:82:18: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
    auto model = fastllm::CreateLLMModelFromFile(config.path);
                 ^
[ 93%] Built target quant
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/apiserver.cpp:4:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/apiserver/apiserver.cpp:231:8: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
struct WorkQueue {
       ^
[ 93%] Built target main
1 warning generated.
[ 95%] Linking HIP executable benchmark
[ 95%] Built target benchmark
11 warnings generated.
1 warning generated.
[ 97%] Linking HIP executable apiserver
[ 97%] Built target apiserver
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/webui/webui.cpp:4:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/example/webui/webui.cpp:76:18: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
    auto model = fastllm::CreateLLMModelFromFile(config.path);
                 ^
1 warning generated.
[100%] Linking HIP executable webui
[100%] Built target webui

6. 运行demo

准备模型,以 huangyuyang/chatglm2-6b-int4.flm 为例。

# 命令行聊天程序
./main -p chatglm2-6b-int4.flm
root@notebook-1823641624653922306-scnlbe5oi5-42808:/public/home/scnlbe5oi5/Downloads/cache/fastl
ild# ./main -p chatglm2-6b-int4.flm
AVX: ON
AVX2: ON
AARCH64: OFF
Neon FP16: OFF
Neon DOT: OFF
Load (200 / 200)
Warmup...
Launch params (512, 1, 1) are larger than launch bounds (256) for kernel _Z26FastllmRMSNormKerne512EEvPfS0_S0_iif please add __launch_bounds__ to kernel define or use --gpu-max-threads-per-blole program !
finish.
欢迎使用 chatglm 模型. 输入内容对话,reset清空历史记录,stop退出程序.
用户: hi
chatglm: Hello! How can I assist you today?
用户: 中国深圳有哪些旅游景点
chatglm: 深圳是一个美丽的城市,有很多值得一游的景点。以下是一些深圳的旅游景点:

1. 深圳湾公园:是一座大型公园,位于深圳湾海滨,可以欣赏到美丽的海景和城市景观。

2. 华侨城:这是一个综合性的文化城,里面有很多娱乐设施和景点,如大型主题公园、音乐厅和博物馆等。

3. 深圳会展中心:这是一个现代化的展览中心,可以举办各种展览和活动。

4. 东部华侨城:这是一个以海洋文化为主题的大型综合性景区,里面有很多海洋生物和各种娱乐项目。

5. 深圳中心书城:这是一个大型的书店,里面有很多图书和文化产品。

6. 深圳动物园:这是一个大型的动物园,可以了解到各种动物和它们的生活习性。

7. 大梅沙海滨公园:这是一个美丽的海滨公园,里面有很多户外活动设施和景观。

8. 深圳技术馆:这是一个展示科技和文化的博物馆,可以了解到各种科技发展的趋势和文化。

9. 深圳音乐厅:这是一个现代化的音乐厅,可以举办各种音乐演出和活动。

10. 深圳海底世界:这是一个大型的海洋生物博物馆,可以了解到各种海洋生物和它们的生活习性。

运行时的资源占用情况

在这里插入图片描述

在这里插入图片描述

三、FAQ

Q:#error ("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__"

Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__ Error #1789

/opt/dtk/include/hip/hip_vector_types.h:38:2: error: #error ("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
   38 | #error("Must define exactly one of __HIP_PLATFORM_AMD__ or __HIP_PLATFORM_NVIDIA__");
      |  ^~~~~
In file included from /opt/dtk/include/hip/hip_runtime.h:113,
                 from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/devices/rocm/fastllm-rocm.hiph:2,
                 from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/fastllm.cpp:38:
/opt/dtk/include/hip/hip_runtime_api.h:8549:61: error: 'hipHostMallocDefault' was not declared in this scope
 8549 |                                        unsigned int flags = hipHostMallocDefault) {
      |                                                             ^~~~~~~~~~~~~~~~~~~~
/opt/dtk/include/hip/hip_runtime_api.h:8568:61: error: 'hipMemAttachGlobal' was not declared in this scope
 8568 |                                        unsigned int flags = hipMemAttachGlobal) {
      |                                                             ^~~~~~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/fastllm.dir/build.make:76: CMakeFiles/fastllm.dir/src/fastllm.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:97: CMakeFiles/fastllm.dir/all] Error 2
make: *** [Makefile:91: all] Error 2

错误原因:未指定 D__HIP_PLATFORM_AMD__

解决方法

# 设置环境变量
export CXXFLAGS="-I${ROCM_PATH}/include -Wno-pass-failed -D__HIP_PLATFORM_AMD__"

Q:error: use of undeclared identifier 'CUR_DEVICE' contextLayer.ToDevice(CUR_DEVICE)

/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/models/chatglm.cpp:382:31: error: use of undeclared identifier 'CUR_DEVICE'
        hiddenStates.ToDevice(CUR_DEVICE);
                              ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/models/chatglm.cpp:518:34: error: use of undeclared identifier 'CUR_DEVICE'
                pastKey.ToDevice(CUR_DEVICE);
                                 ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/models/chatglm.cpp:519:36: error: use of undeclared identifier 'CUR_DEVICE'
                pastValue.ToDevice(CUR_DEVICE);
                                   ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/models/chatglm.cpp:668:43: error: use of undeclared identifier 'CUR_DEVICE'
                    contextLayer.ToDevice(CUR_DEVICE);
                                          ^
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:3:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/model.h:8:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/models/basellm.h:2:
In file included from /public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/include/fastllm.h:19:
In file included from /usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/memory:80:
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:81:2: warning: delete called on 'fastllm::basellm' that is abstract but has non-virtual destructor [-Wdelete-abstract-non-virtual-dtor]
        delete __ptr;
        ^
/usr/lib/gcc/x86_64-linux-gnu/9/../../../../include/c++/9/bits/unique_ptr.h:292:4: note: in instantiation of member function 'std::default_delete<fastllm::basellm>::operator()' requested here
          get_deleter()(std::move(__ptr));
          ^
/public/home/scnlbe5oi5/Downloads/cache/fastllm-rocm/src/model.cpp:100:16: note: in instantiation of member function 'std::unique_ptr<fastllm::basellm>::~unique_ptr' requested here
        return std::unique_ptr<fastllm::basellm> (model);
               ^
1 error generated.
make[2]: *** [CMakeFiles/fastllm.dir/build.make:90: CMakeFiles/fastllm.dir/src/device.cpp.o] Error 1

错误原因:未指定 DUSE_ROCM

解决方法

cmake .. -DUSE_ROCM=ON -DCMAKE_CXX_COMPILER=/opt/dtk/llvm/bin/clang++

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2051752.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Selenium + Python 自动化测试18(数据驱动实现测试)

我们的目标是&#xff1a;按照这一套资料学习下来&#xff0c;大家可以独立完成自动化测试的任务。 上一篇我们讨论了数据驱动测试中如何读取Excel文件&#xff0c;今天我们试着进一步深入学习数据驱动。 本篇文章我们讨论一下如何使用数据驱动思想实现测试。 1、数据驱动框架…

从零开始学cv-5: 图像的仿射变换

文章目录 一&#xff0c;简介&#xff1a;二&#xff0c;图像仿射变换详解2.1&#xff0c;图像平移&#xff1a;2.2 &#xff0c;图像旋转&#xff1a;2.3&#xff0c;仿射变换&#xff1a; 一&#xff0c;简介&#xff1a; 仿射变换&#xff08;Affine Transformation 或 Aff…

Lumina学术引擎免费问世,性能超谷歌学术5倍

Lumina介绍 Lumina是一款完全免费的AI学术搜索引擎&#xff0c;借助强大的数据库和高效的匹配速度。利用超过 15 种模型从超过 100 万篇期刊文章中找出最相关的来源&#xff0c;从而构建答案。搜索结果相关性平均比谷歌学术高出5倍&#xff0c;支持超1亿研究对象搜索&#xff…

8.18日学习打卡---Spring Cloud Alibaba(五)

8.18日学习打卡 目录&#xff1a; 8.18日学习打卡 RocketMQ什么是RocketMQ生产者和消费者技术架构 RocketMQ安装与配置环境搭建与测试RocketMQ管理命令 RocketMQ发送消息普通消息顺序消息之全局消息顺序消息之局部消息消费者消费消息延迟消息延迟消息代码实现单向消息批量消息过…

【HarmonyOS】云开发-用户自动认证

背景 华为云服务提供了统一认证的云服务&#xff0c;支持手机、邮箱等自定义登录服务&#xff0c;并且提供了免费使用的额度&#xff0c;这样子方便中小企业或者项目快速的开发工作。下面是支持的认证方式&#xff1a; 操作步骤 1.AGC(AppGallery Connect)创建项目 在AGC界…

C++ | Leetcode C++题解之第342题4的幂

题目&#xff1a; 题解&#xff1a; class Solution { public:bool isPowerOfFour(int n) {return n > 0 && (n & (n - 1)) 0 && n % 3 1;} };

zabbix监控进程、日志、主从状态和主从延迟

zabbix监控进程、日志、主从状态和主从延迟 监控进程1、下载服务2、编写脚本3、编写zabbix_agentd.conf4、新建监控项配置触发器5、查看邮件 监控日志1、上传log.py的2、编写zabbix_agentd.conf3、新建监控项配置触发器 监控数据库主从状态1、编写/etc/hosts&#xff08;master…

IOS 09 R.swift框架和使用方法

R.swift框架主要是实现通过类字段访问字符串&#xff0c;图片&#xff0c;等资源&#xff1b;类似Android那边通过R类访问&#xff0c;好处是有提示&#xff0c;如果缺少资源&#xff0c;直接就是编译错误&#xff1b;OC类似的功能叫R.objc。 添加依赖 添加依赖 #将资源&…

第八周:机器学习笔记

第八周机器学习笔记 摘要Abstract机器学习1. 鱼和熊掌和可兼得的机器学习1.1 Deep network v.s. Fat network 2. 为什么用来验证集结果还是不好&#xff1f; Pytorch学习1. 卷积层代码实战2. 最大池化层代码实战3. 非线性激活层代码实战 总结 摘要 本周学习对李宏毅机器学习视…

AI学习记录 - Word2Vec 超详细解析

创作不易&#xff0c;点个赞 我们有一堆文本&#xff0c;词汇拆分 sentences ["jack like dog", "jack like cat", "jack like animal","dog cat animal", "banana apple cat dog like", "dog fish milk like"…

URP平面阴影合批处理 shadow

闲谈 相信大家在日常工作中发现了一个问题 &#xff0c; urp下虽然可以做到3个Pass 去写我们想要的效果&#xff0c;但是&#xff0c;不能合批&#xff08;不能合批&#xff0c;那不是我们CPU要干冒烟~&#xff01;&#xff09; 好家伙&#xff0c;熊猫老师的偏方来了 &#x…

【数值方法-Python实现】Crout分解+追赶法实现

涉及Crout分解、追赶法的线性方程组求解方法的Python实现。 原文链接&#xff1a;https://www.cnblogs.com/aksoam/p/18366119 Codes def CroutLU(A:np.ndarray)->Tuple[np.ndarray,np.ndarray]:"""Crout LU分解算法,ALUinput:A: (n,n) np.ndarray,方阵out…

DrissionPage自动化获取城市数据内容

一、获取页面内容 二、最终结果 上海市 约收录140个指标 查看98075次 人均GDP 153299元 公交车 17899辆 户籍人口 1469.3万人 三、代码 from DrissionPage._pages.chromium_page import ChromiumPage import time page ChromiumPage() page.get(https://www.swguancha.com/…

【Delphi】中多显示器操作基本知识点

提要&#xff1a; 目前随着计算机的发展&#xff0c;4K显示器已经逐步在普及&#xff0c;笔记本的显示器分辨率也都已经超过2K&#xff0c;多显示器更是普及速度很快。本文介绍下Delphi中操作多显示器的基本知识点&#xff08;Windows系统&#xff09;&#xff0c;这些知识点在…

UniFab 是一款由人工智慧驅動的視訊增強器+ crack

UniFab 是一款功能强大的视频处理工具,包括 10 个基于 AI 的功能。使用 UniFab,您可以提高视频和音频质量、将视频转换为不同的格式、根据自己的喜好编辑视频等等。以下是适用于 Windows 的 UniFab 程序的简要说明: 视频转换器。UniFab 支持 1000 多种视频格式的转换,包括 …

构建自己的图数据集

代码&#xff1a; import warnings warnings.filterwarnings("ignore") import torch from torch_geometric.data import Datax torch.tensor([[2,1],[5,6],[3,7],[12,0]],dtypetorch.float) y torch.tensor([0,1,0,1],dtypetorch.float)#定义边 edge_index torc…

⌈ 传知代码 ⌋ DETR[端到端目标检测]

&#x1f49b;前情提要&#x1f49b; 本文是传知代码平台中的相关前沿知识与技术的分享~ 接下来我们即将进入一个全新的空间&#xff0c;对技术有一个全新的视角~ 本文所涉及所有资源均在传知代码平台可获取 以下的内容一定会让你对AI 赋能时代有一个颠覆性的认识哦&#x…

Leetcode3232. 判断是否可以赢得数字游戏

Every day a Leetcode 题目来源&#xff1a;3232. 判断是否可以赢得数字游戏 解法1&#xff1a;3232. 判断是否可以赢得数字游戏 用一个 sum1 统计个位数的和&#xff0c;sum2 统计十位数的和。 只要 sum1 和 sum2 不相等&#xff0c;Alice 拿大的就能赢得这场游戏。 代码…

【论文阅读】HuatuoGPT-II, One-stage Training for Medical Adaption of LLMs

总体概要 本文深入探讨了一款专为医疗领域设计的大规模语言模型——HuatuoGPT-II的创新、性能与应用。HuatuoGPT-II采用统一的单阶段训练流程&#xff0c;将传统的继续预训练和监督微调整合&#xff0c;有效解决了医疗数据的异质性问题&#xff0c;包括语言、体裁和格式差异&a…

【STM32单片机_(HAL库)】3-2-1【中断EXTI】【电动车报警器项目】继电器定时开闭

1.硬件 STM32单片机最小系统继电器模块 2.软件 继电器模块alarm驱动文件添加GPIO常用函数main.c程序 #include "sys.h" #include "delay.h" #include "led.h" #include "alarm.h"int main(void) {HAL_Init(); …