Unable to compile for ROCM on Ubuntu 22.04 #134

Open
opened 2023-09-16 18:20:55 -04:00 by bugfixin · 1 comment
bugfixin commented 2023-09-16 18:20:55 -04:00 (Migrated from github.com)

Using the command $ CC="/opt/rocm/llvm/bin/clang" CXX="/opt/rocm/llvm/bin/clang++" CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers I am unable to compile ctransformers for ROCM. I've tried with ROCM 5.5.3 as well as 5.6.1, and for ctransformers versions 0.2.26 and 0.2.27.

Each time I get an error: /models/ggml/ggml-cuda-ggllm.h:15:37: error: array has incomplete element type 'struct cudaDeviceProp'

Full error (2799 lines...) attached.

Am I doing something wrong or missing some dependencies? I've tried without the CC and CXX variables set, but that fails even earlier as it tries to compile with the standard gcc utilities.

ctransformers-error.txt

Using the command `$ CC="/opt/rocm/llvm/bin/clang" CXX="/opt/rocm/llvm/bin/clang++" CT_HIPBLAS=1 pip install ctransformers --no-binary ctransformers` I am unable to compile ctransformers for ROCM. I've tried with ROCM 5.5.3 as well as 5.6.1, and for ctransformers versions 0.2.26 and 0.2.27. Each time I get an error: `/models/ggml/ggml-cuda-ggllm.h:15:37: error: array has incomplete element type 'struct cudaDeviceProp'` Full error (2799 lines...) attached. Am I doing something wrong or missing some dependencies? I've tried without the CC and CXX variables set, but that fails even earlier as it tries to compile with the standard gcc utilities. [ctransformers-error.txt](https://github.com/marella/ctransformers/files/12641649/ctransformers-error.txt)
huotianyu commented 2024-03-19 23:37:30 -04:00 (Migrated from github.com)

the below command worked well!
CMAKE_ARGS="-DLLAMA_HIPBLAS=on -DLLAMA_CLBLAST=on -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ -DCMAKE_PREFIX_PATH=/opt/rocm" FORCE_CMAKE=1 pip install ctransformers --no-binary ctransformers

the below command worked well! CMAKE_ARGS="-DLLAMA_HIPBLAS=on -DLLAMA_CLBLAST=on -DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang -DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++ -DCMAKE_PREFIX_PATH=/opt/rocm" FORCE_CMAKE=1 pip install ctransformers --no-binary ctransformers
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
marella/ctransformers#134
No description provided.