Giter VIP home page Giter VIP logo

Comments (9)

emankov avatar emankov commented on July 26, 2024 1

The problem is that hipify-clang is awaiting clang header files in the 17 subfolder (in the newest format), whereas the rocm has an older format of this clang's subfolder: 17.0.0:

ignoring nonexistent directory "/opt/rocm/llvm/lib/clang/17/include/cuda_wrappers"
ignoring nonexistent directory "/opt/rocm/llvm/lib/clang/17/include"

What version of the ROCm and HIPIFY packages did you install?
Do they have the same version?

As an ugly workaround to make it work in your current configuration, you may copy the contains of the /opt/rocm/llvm/lib/clang/17.0.0/include/ to newly created /opt/rocm/llvm/lib/clang/17/include/. Explicit includes to clang like -I /opt/rocm/llvm/lib/clang/17/include/ are not needed, moreover, they can't help, as instead multiple -internal-isystem includes are used internally by hipify-clang itself. That is why you are getting multiple ignoring nonexistent directory messages in the verbose mode.

from hipify.

mindrunner avatar mindrunner commented on July 26, 2024 1

I am in arch installing both packages from extra repository. Current package version is (both):
5.7.1-1

If I symlink 17.0.0 to 17 in /opt/rocm/llvm/lib/clang/, I seem to be able to convert a file with the following command:

/opt/rocm/hip/bin/hipify-clang -v --inplace common.cu --cuda-path=/opt/cuda -I /opt/rocm/include/

from hipify.

emankov avatar emankov commented on July 26, 2024

What happened without -I /opt/rocm/llvm/lib/clang/17.0.0/include/?

from hipify.

mindrunner avatar mindrunner commented on July 26, 2024

Thanks for your answer. Can't test before January since I am traveling over Christmas 🎄. Will try and report back as soon as I am back in office!

from hipify.

mindrunner avatar mindrunner commented on July 26, 2024

Without the Include parameter, I am getting the following error:

<built-in>:1:10: fatal error: '__clang_cuda_runtime_wrapper.h' file not found
#include "__clang_cuda_runtime_wrapper.h"

from hipify.

mindrunner avatar mindrunner commented on July 26, 2024

Moving on to a more complex file, however, seems to greate more issues:

/tmp/aes_cbc.cu-6884ee.hip:199:16: error: redefinition of 'l_te' with a different type: 'const u32 *' (aka 'const unsigned int *') vs 'u32[256]' (aka 'unsigned int[256]')
    const u32* l_te = g_Te0;
               ^
/tmp/aes_cbc.cu-6884ee.hip:194:20: note: previous definition is here
    __shared__ u32 l_te[256];
                   ^
7 warnings and 1 error generated when compiling for host.
Error while processing /tmp/aes_cbc.cu-6884ee.hip.

I have to admit, that I have no / little experience with cuda and GPU programming at all, so this might take more time to investigate (If it even makes sense what I am doing) :/

Thanks for your help anyways! :)

from hipify.

emankov avatar emankov commented on July 26, 2024

Moving on to a more complex file, however, seems to greate more issues:

/tmp/aes_cbc.cu-6884ee.hip:199:16: error: redefinition of 'l_te' with a different type: 'const u32 *' (aka 'const unsigned int *') vs 'u32[256]' (aka 'unsigned int[256]')
    const u32* l_te = g_Te0;
               ^
/tmp/aes_cbc.cu-6884ee.hip:194:20: note: previous definition is here
    __shared__ u32 l_te[256];
                   ^
7 warnings and 1 error generated when compiling for host.
Error while processing /tmp/aes_cbc.cu-6884ee.hip.

I have to admit, that I have no / little experience with cuda and GPU programming at all, so this might take more time to investigate (If it even makes sense what I am doing) :/

Thanks for your help anyways! :)

Well, the compiler says that you have a redefinition of u32, and it looks like it is redefined. Have you tried to compile your CUDA source by CUDA's nvcc? Is the source correct?

from hipify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.