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

fatal error: CL/cl.h: No such file or directory #8

Open
minzak opened this issue Dec 2, 2019 · 5 comments
Open

fatal error: CL/cl.h: No such file or directory #8

minzak opened this issue Dec 2, 2019 · 5 comments

Comments

@minzak
Copy link

minzak commented Dec 2, 2019

I have installed CL for this path:

root@z820 /opt/rocm/opencl/include # tree
.
├── CL
│   ├── cl_ext.h
│   ├── cl_gl_ext.h
│   ├── cl_gl.h
│   ├── cl.h
│   ├── cl.hpp
│   ├── cl_platform.h
│   └── opencl.h
└── opencl-c.h

And work other cmake with option like that:
cmake .... -DOpenCL_INCLUDE_DIR=/opt/rocm/opencl/include -DOpenCL_LIBRARY=/opt/rocm/opencl/lib/x86_64/libOpenCL.so ....
And i got error:

root@z820 /usr/src/RandomX_OpenCL/RandomX_OpenCL # make
clrxasm GCNASM/randomx_run_gfx803.asm -o randomx_run_gfx803.bin
clrxasm GCNASM/randomx_run_gfx900.asm -o randomx_run_gfx900.bin
g++ *.cpp -O3 -lOpenCL -lpthread ../RandomX/build/librandomx.a -o opencl_test
In file included from miner.cpp:26:
opencl_helpers.h:29:10: fatal error: CL/cl.h: No such file or directory
 #include <CL/cl.h>
          ^~~~~~~~~
compilation terminated.
In file included from opencl_helpers.cpp:23:
opencl_helpers.h:29:10: fatal error: CL/cl.h: No such file or directory
 #include <CL/cl.h>
          ^~~~~~~~~
compilation terminated.
In file included from tests.cpp:24:
opencl_helpers.h:29:10: fatal error: CL/cl.h: No such file or directory
 #include <CL/cl.h>
          ^~~~~~~~~
compilation terminated.
make: *** [makefile:4: release] Error 1

How to make and put needed path to make?
Thanks.

@SChernykh
Copy link
Owner

SChernykh commented Dec 2, 2019

There's no CMakeFile here, you have to add OpenCL include path go g++ command line in makefile

Also, GCN assembly provided here doesn't suport ROCm, so you'll only be able to test it with --portable command line switch.

@minzak
Copy link
Author

minzak commented Dec 2, 2019

Hm, no one command not see *.h files:
Result a same ((


g++ *.cpp -O3 -l/opt/rocm/opencl/include -lpthread ../RandomX/build/librandomx.a -o opencl_test
g++ *.cpp -O3 -l/opt/rocm/opencl/include/ -lpthread ../RandomX/build/librandomx.a -o opencl_test
g++ *.cpp -O3 -l/opt/rocm/opencl/include/CL -lpthread ../RandomX/build/librandomx.a -o opencl_test
g++ *.cpp -O3 -l/opt/rocm/opencl/include/CL/ -lpthread ../RandomX/build/librandomx.a -o opencl_test
g++ *.cpp -O3 -l/opt/rocm/opencl/include/CL/cl.h -lpthread ../RandomX/build/librandomx.a -o opencl_test

GCN assembly provided here doesn't suport ROCm

I'm want to try it

@minzak
Copy link
Author

minzak commented Dec 2, 2019

@SChernykh

Also, GCN assembly provided here doesn't suport ROCm, so you'll only be able to test it with --portable command line switch.

Hm - i'm not shure, it is can helps - https://rocm.github.io/GCN_asm_tutorial.html ?

@SChernykh
Copy link
Owner

I know how to write GCN asm code. ROCm just uses different binary format and different kernel configurations (read this) - it's a mess, and I have no time/incentive to add support for it since GPU mining RandomX is unprofitable.

@minzak
Copy link
Author

minzak commented Dec 2, 2019

Also, GCN assembly provided here doesn't suport ROCm, so you'll only be able to test it with --portable command line switch.

Я верно пнимаю, надо сделать рефакторинг только randomx_run_gfx900.asm согласно https://github.com/CLRX/CLRX-mirror/wiki/ClrxAsmRocm, и дело в шляпе?

@minzak minzak reopened this Dec 2, 2019
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