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

CMake compilation with clBLAS fails on hard-coded AMDADDPSDK path #352

Open
tsjordan-eng opened this issue May 14, 2020 · 1 comment
Open

Comments

@tsjordan-eng
Copy link

When I compile a program using CMake, the target that links directly to clBLAS builds, but anything that then links to that target fails because:

make[2]: *** No rule to make target '/opt/AMDAPPSDK-3.0/lib/x86_64/libOpenCL.so', needed by [target].  Stop

The offending line appears in clBLASTargets-release.cmake when the concrete path to the AMD APP SDK is set. Removing that path allows the compilation to succeed.

We could remove that path or substitute in ${OpenCL_LIBRARY}, but I think the real goal should be to move towards a Modern CMake approach where targets, not variables, are defined as this is best-practice. Something like clBLAS::clBLAS rather than the variables.

refer to: https://pabloariasal.github.io/2018/02/19/its-time-to-do-cmake-right/#model-dependencies-with-target_link_libraries

@tingxingdong
Copy link
Contributor

Notice: when you download & install AMD 's graphic driver (https://www.amd.com/en/support). You actually have already installed the OpenCL real driver.

Step 1: but you still lack OpenCL header/library. So come here. https://github.com/GPUOpen-LibrariesAndSDKs/OCL-SDK/releases

download & Install the exe and you see header/*.lib. *.lib will find the real driver for you, acting like an ICD loader.

On my Win10, it is installed in C:\Program Files (x86)\OCL_SDK_Light\

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