Comments (3)
It looks like you are building the opencl backend and then using hip api with this which why this is broken. The cl_mem
pointers and the device pointers from hip are not compatible. To build the hip backend, you need to set your compiler to hcc:
mkdir debug && cd debug
CXX=/opt/rocm/bin/hcc cmake -DCMAKE_BUILD_TYPE=Debug ../
make
sudo make install
You may need to also set the CMAKE_PREFIX_PATH
as shown in the readme depending on how you installed hcc and hip: -DCMAKE_PREFIX_PATH="/opt/rocm/hcc;/opt/rocm/hip"
.
from miopen.
@pfultz2 Thank you! This is what was wrong.
Is there a way to detect that MIOpen was compiled differently then how it is used?
Looking into miopen/config.h
:
#define MIOPEN_BACKEND_OPENCL 0
#define MIOPEN_BACKEND_HCC 0
#define MIOPEN_BACKEND_HIP 1
it looks like there are 3 possible backends at the moment. Are the HCC
and HIP
backends compatible?
So if I'm writing a hip
based MIOpen application, I guess I could add something like the following:
#if MIOPEN_BACKEND_OPENCL
#error "The MIOpen OpenCL backend is not compatible with hip/hcc"
#endif
Is there a generic way you could detect the hip
or hcc
compiler in the MIOpen header and throw an error like this?
from miopen.
Are the HCC and HIP backends compatible?
The HCC backend is planned for the future, but it is not used.
So if I'm writing a hip based MIOpen application, I guess I could add something like the following:
That is one possible solution.
Is there a generic way you could detect the hip or hcc compiler in the MIOpen header and throw an error like this?
I dont think this is robust as we can compile our opencl backend using hcc. We could try to detect if a hip header has been included and then produce an error, but this only works when hip is included before miopen.
If you are using find_package(miopen PATHS /opt/rocm)
in cmake using hcc, then you should always get an error about missing headers when the wrong backend is used.
from miopen.
Related Issues (20)
- Implementation of MIOPEN_BACKEND_EXECUTION_PLAN_DESCRIPTOR
- Tests for MIOPEN_BACKEND_ENGINE_DESCRIPTOR
- Tests for MIOPEN_BACKEND_ENGINECFG_DESCRIPTOR
- Tests for MIOPEN_BACKEND_EXECUTION_PLAN_DESCRIPTOR
- [MHA] Implement MIOPEN_BACKEND_ENGINEHEUR_DESCRIPTOR
- MIOPEN_BACKEND_ENGINEHEUR_DESCRIPTOR Implementation
- MIOPEN_BACKEND_ENGINEHEUR_DESCRIPTOR Tests
- [gTest] Environmental variable to control applicable platforms for the tests HOT 9
- Unable to builld MIOpen from source on SLES HOT 1
- [XNACK] GPU is asleep during the copy and not waking back up when it should. HOT 7
- Build failure Unable to found boost_filesystem HOT 2
- Reproduce kernel cache binary files in MIOpen HOT 1
- [urgent] HipBuildImpl() seems fail to create temp dir or due to no GPU presents in build env HOT 6
- [WA] re-enable conv_hip_implicit_gemm_grouped_bwd_xdlops after kernel dev work
- Softmax invoking FP16 kernel for FP32 input
- [GEMM group conv] Incorrect GPU time when GemmBwd1x1_stride1 and GemmFwd1x1_0_1 are invoked in "Run" mode. HOT 1
- [URGENT] error: no member named 'for_each_n' in namespace 'std' HOT 5
- Excessive warning messages on workspace provided and required (IsEnoughWorkspace) after #2947 HOT 3
- Build process, which to follow? HOT 1
- [Windows] graphapi gtests are not compiling due to missing class methods HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from miopen.