Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to run examples/storygen/amd.sh on ROCm 5.6 #35

Open
marty1885 opened this issue Jul 21, 2023 · 1 comment
Open

Failed to run examples/storygen/amd.sh on ROCm 5.6 #35

marty1885 opened this issue Jul 21, 2023 · 1 comment

Comments

@marty1885
Copy link

Hi, I'm trying to run this repo on my AMD card. I have HIP and ROCm running. But fail to run the example provided in README. Am I doing anything wrong?

❯ ./amd.sh
In file included from ./storygen.cpp:1:
In file included from ../../include/rwkv.h:1:
../../include/rwkv/rwkv/rwkv.h:249:21: error: reference to __device__ function 'operator delete[]' in __host__ function
    int **tensors = new int *[46];
                    ^
/opt/rocm/llvm/lib/clang/16.0.0/include/cuda_wrappers/new:73:24: note: 'operator delete[]' declared here
__device__ inline void operator delete[](void* ptr) CUDA_NOEXCEPT {
                       ^
In file included from ./storygen.cpp:1:
In file included from ../../include/rwkv.h:1:
../../include/rwkv/rwkv/rwkv.h:249:21: error: reference to __device__ function 'operator delete[]' in __host__ function
    int **tensors = new int *[46];
                    ^
./storygen.cpp:11:17: note: called by 'main'
    RWKV Rwkv = RWKV();
                ^
/opt/rocm/llvm/lib/clang/16.0.0/include/cuda_wrappers/new:73:24: note: 'operator delete[]' declared here
__device__ inline void operator delete[](void* ptr) CUDA_NOEXCEPT {
                       ^
2 errors generated when compiling for host.

System info

OS: Arch Linux x64
HIPCC: 5.6.31061
C++ compiler: GCC 13

❯ hipcc --version
HIP version: 5.6.31061-
clang version 16.0.0
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /opt/rocm/llvm/bin

Thanks

@harrisonvanderbyl
Copy link
Owner

You may need to specify c++17 somewhere.
Please also make sure to edit ./amd.sh to set your hardware model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants