- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Offline compilation for gfx906 not possible on a VM
We used to compile our OpenCL code on a virtual machine without an AMD GPU by extracting all DLL files from AMD driver to a folder in PATH. This worked fine until at least Catalyst 17.8.2 and allowed us to compile binaries for up to Vega 56/64 (gfx900).
When we tried to do the same for Radeon VII (gfx906) and used the Adrenaline 19.2.2 driver, clGetPlatformIDs returned CL_PLATFORM_NOT_FOUND_KHR. We are thus unable to ship our products with binaries for Radeon VII.
Steps to reproduce:
1. Prepare a clean virtual machine (we use Windows 7) without any AMD GPUs
2. Install OpenCL SDK (we use APP SDK 3.0)
3. Create a folder and extract all binary files from the Adrenaline 19.2.2 package to that folder
4. Add this folder to PATH
5. Make sure that HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors includes the 'amdocl64.dll' DWORD value.
6. Compile a simple C-program that tries to initialize OpenCL like this:
#include "CL/cl.h"
int main(int argc, char** argv)
{
cl_uint numPlatforms;
cl_int status = clGetPlatformIDs(0, NULL, &numPlatforms);
printf("status-1: %d\n", status);if(status == CL_SUCCESS && numPlatforms > 0)
{cl_platform_id* platforms = (cl_platform_id*)malloc(numPlatforms * sizeof(cl_platform_id));
status = clGetPlatformIDs(numPlatforms, data.platforms, NULL);printf("status-2: %d\n", status);
}}
7. Run the program. Status will be -1001 (CL_PLATFORM_NOT_FOUND_KHR).
Now if in step 3 you use binaries from Catalyst 17.8.2 instead, the code will work just fine.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just wanted to report that the issue is resolved in Adrenalin 19.7.1.
Thank you for your assistance, Dipak.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
With Adrenaline 19.2.2, does the above issue also occur for any other GPU devices? Or only for Radeon VII (gfx906)?
By the way, I assume you tried this driver: amd-radeon-vii
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Dipak.
I can't even get to the actual compilation for gfx906 or any other devices -- our in-house OpenCL-based offline compiler simply fails when tries to initialize OpenCL as described in the post.
I will specifically check 19.3.4 from the link you provided and let you know the results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tested with 19.3.4 -- same result.
Please find the corrected listing below (the previous one did not compile):
#include "CL/cl.h"
#include "stdio.h"
#include "stdlib.h"
int main(int argc, char** argv)
{
cl_uint numPlatforms;
cl_int status = clGetPlatformIDs(0, NULL, &numPlatforms);
printf("status-1: %d\n", status);if(status == CL_SUCCESS && numPlatforms > 0)
{
cl_platform_id* platforms = (cl_platform_id*)malloc(numPlatforms * sizeof(cl_platform_id));
status = clGetPlatformIDs(numPlatforms, platforms, NULL);printf("status-2: %d\n", status);
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dipak,
any updates on this?
What is the proper way to obtain a binary file for an OpenCL program on a virtual machine that can be later used on a physical Windows-based computer with Radeon VII by calling clCreateProgramWithBinary + clBuildProgram?
Thank you,
Tim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sorry for this delayed reply. I've asked our OpenCL team for suggestion. Once I get their reply, I'll share with you.
By the way, thank you for sharing those details.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Update:
A bug ticket has been created against the issue. I'll let you know if I get any further update about it.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks Dipak.
Looking forward to the response from the relevant team.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Dipak,
could you please provide an update on the issue? Our customers are requesting support for Radeon VII in our products which we currently cannot provide, so it's becoming quite urgent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From our internal issue tracking system, the issue seems still under investigation. I will try if I can get any further information about it. Thank you for your patience.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am sorry to keep asking about this, but our users send me the same question more and more often.
Do you have any updates about this? Maybe there are some other workarounds available?
It's a shame that we cannot support AMD's top GPU in our products.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I understand your situation. But I'm sorry to say that I don't have any further update at this moment. I already notified the concerned team about your last post. As soon as I get any response from the team, I'll share with you.
Thanks for your patience
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is an update. As I've just been informed, the issue has been fixed in the internal build.
Once I've more information about the fix, I'll share with you.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, Dipak.
Will be happy to test this as soon as I can get the driver with the fix included (even if it's an alpha/beta).
Please let me know.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi dipak,
just wanted to let you know that the problem still exists in Adrenalin 19.6.1.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, that's expected. As I've come to know, the latest public driver doesn't have the fix. The fix is yet to be promoted to the mainline driver.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
19.6.2 - still broken.
Sorry to be that impatient, but the problem has been reported 3 months ago and we are getting requests to support Radeon VII every day.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can understand it, however sometimes release of a fix may take little longer depending on the release schedule. I will check with the concerned team if they can provide an ETA on the fix.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've sent you a PM, please check your inbox.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just wanted to report that the issue is resolved in Adrenalin 19.7.1.
Thank you for your assistance, Dipak.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for the confirmation.
