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

How to use hcc_hsail in Rocm 1.3 #170

Closed
bshaozi opened this issue Nov 18, 2016 · 3 comments
Closed

How to use hcc_hsail in Rocm 1.3 #170

bshaozi opened this issue Nov 18, 2016 · 3 comments

Comments

@bshaozi
Copy link

bshaozi commented Nov 18, 2016

I had compiled my code successful and run correctly in rocm 1.2 envrionment(Kaveri).
But after I update the rocm to 1.3, I found it seems the hcc_hsail had been deprecated.
So, I use '/opt/rocm/hcc/' instead of /opt/rocm/hcc-hsail/. (for instance , use /opt/rocm/hcc/bin/hcc /opt/rocm/hcc/bin/hcc-config --cxxflags --ldflags -I /opt/rocm/hcc/include/ xxx.cpp -o xxx to compile). It compiles successful.
But it returns error when running.follows is the error information.

HCC STATUS_CHECK Error: HSA_STATUS_ERROR_INCOMPATIBLE_ARGUMENTS (0x100d) at file:/home/scchan/code/github/radeonopencompute/hcc.1.3/hcc/lib/hsa/mcwamp_hsa.cpp line:2504

Abortado (`core' generado)

How can I compile my code in Kaveri envrionment with rocm 1.3?

@whchung
Copy link
Collaborator

whchung commented Nov 18, 2016

could you try add "--amdgpu-target=AMD:AMDGPU:8:0:1" in your compile option? The default compiler backend now generates GCN instructions instead of HSAIL by default, and --amdgpu-target= let's you specify GCN ISA for your APU or dGPU.

@bshaozi
Copy link
Author

bshaozi commented Nov 21, 2016

Thank you for the reply. I had added the '--amdgpu-target=AMD:AMDGPU:8:0:1' in my compile option. But when I run the program, it still crash and return error information as follows:

HCC STATUS_CHECK Error: HSA_STATUS_ERROR_INCOMPATIBLE_ARGUMENTS (0x100d) at file:/home/scchan/code/github/radeonopencompute/hcc.1.3/hcc/lib/hsa/mcwamp_hsa.cpp line:2504

Aborted (core dumped)

Follows is my compile command(in ROCM 1.3) ,it doesn't work:
/opt/rocm/hcc/bin/hcc /opt/rocm/hcc/bin/hcc-config --cxxflags --ldflags --amdgpu-target=AMD:AMDGPU:8:0:1 xxx.cpp -o xxx

Before I update ROCM to 1.3. My compile command as follows and it works well:
/opt/rocm/hcc-hsail/bin/hcc /opt/rocm/hcc-hsail/bin/hcc-config --cxxflags --ldflags -I /opt/rocm/hcc-hsail/include/ xxx.cpp -o xxx

What should I do to fix it?

Thanks.

haochen@multicorewareinc.com

From: Wen-Heng (Jack) Chung
Date: 2016-11-19 02:23
To: RadeonOpenCompute/hcc
CC: bshaozi; Author
Subject: Re: [RadeonOpenCompute/hcc] How to use hcc_hsail in Rocm 1.3 (#170)
could you try add "--amdgpu-target=AMD:AMDGPU:8:0:1" in your compile option? The default compiler backend now generates GCN instructions instead of HSAIL by default, and --amdgpu-target= let's you specify GCN ISA for your APU or dGPU.

You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@bshaozi
Copy link
Author

bshaozi commented Nov 21, 2016

I add '--amdgpu-target=AMD:AMDGPU:7:0:0' instead of '--amdgpu-target=AMD:AMDGPU:8:0:1.
It works fine.

Thanks again!

@scchan scchan closed this as completed Nov 21, 2016
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

3 participants