-
Notifications
You must be signed in to change notification settings - Fork 235
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
Hard time wrapping this with Go. #103
Comments
I believe |
I changed my cgo flags to that: #cgo CFLAGS: -I/opt/rocm/include Then I get this error:
I tried adding -D__HIP_PLATFORM_HCC__ to the CFLAGS. #cgo CFLAGS: -I/opt/rocm/include -D__HIP_PLATFORM_HCC__ Then, I get two more errors.
I don't think adding -D__HIP_PLATFORM_HCC__ was the correct thing to do because hsa/hsa.h is in the /opt/rocm/include directory. |
I think you need to install the |
It seems I am running into an issue with gcc. I tried making a small c program and built it using both gcc and hipcc. Hipcc worked fine, and gcc didn't (I get the same errors as my previous post). hip_runtime_api.h is supposed to be gcc and c compatable. Is there something I am missing, or is this a bug with hip. I am running ubuntu 18.04 with gcc version 7.4. |
I think this is possibly bug with HIP as its headers are supposed to work with g++. |
Go has to use gcc not g++. But the good news is that I was able to get something to compile. I created a handle then exited. Changes had to be made to hip_runtime_api.h (which I will not go over here. It also looks like there is a pull request that might fix the stuff I had to change). For miopen, I had to add #include<stdbool.h> to miopen.h. |
@pfultz2 Do we want to just permanently add in #include<stdbool.h> to miopen.h? |
I made a pull request. for this issue. |
I am trying to bind miopen with golang. I made binding for cudnn relatively easily. I set the CGO flags to:
//#cgo LDFLAGS:-L/usr/local/cuda/lib64 -lcudnn -lcuda
//#cgo CFLAGS: -I/usr/local/cuda/include/
and it just works.
I'm having a hard time doing this with miopen. I installed rocm and miopen-hip using the prebuilt packages. I can't seem to find documentation to set up miopen and hip to play nice with C and Cgo. Would anyone be able to help me?
The text was updated successfully, but these errors were encountered: