View Issue Details

IDProjectCategoryView StatusLast Update
0004722Kali Linux[All Projects] General Bugpublic2018-10-30 11:21
Reporterretry-oneAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionsuspended 
Product Version2018.1 
Target VersionFixed in Version 
Summary0004722: 'amdgpu 0000:04:00.0: kfd not supported on this ASIC' OpenCL AMD driver 17.50 -552542 Radeon PRO DUO (Polaris)
DescriptionProblem description
When installed AMD Radeon PRO DUO 100-506048 (Polaris) dual GPU video card and latest AMD OpenCL 17.50-552542 driver loaded there is no OpenCL support, and I have kernel message:

'amdgpu 0000:04:00.0: kfd not supported on this ASIC'.

AMD 17.50 OpenCL only driver I use 'amdgpu-compute-17.50-552542.tar' has been attached.

Searching says that Kali 2018.1 kernel v14.4 have not implemented latest patches to support kfd feature for AMD dual GPU video cards with Fuji and/or Polaris architecture. So seems kernel update/patching needed.

Hope the latest Kali release will have stable 4.16.5 or 4.17 kernel with all the patches implemented from ROCm OpenCL stack and Felix Kuehling Felix.Kuehling at amd.com to have dual GPU cards working for OpenCL.

-----------------------------------
Fri Jul 28 21:14:00 UTC 2017

drm/amdgpu: Fix KFD initialization for multi-GPU systems

kfd2kgd is device-specific, so it should not be a global variable.
Merge amdgpu_amdkfd_load_interface and amdgpu_amdkfd_device_probe
so that it's only needed as a local variable in one function.

Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>

-----------------------------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 37 +++++++++++++++---------------
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 2 --
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 1 -
 3 files changed, 18 insertions(+), 22 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
index 2292c77..471f9d4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c
@@ -27,7 +27,6 @@
 #include "amdgpu_gfx.h"
 #include <linux/module.h>
 
-const struct kfd2kgd_calls *kfd2kgd;
 const struct kgd2kfd_calls *kgd2kfd;
 bool (*kgd2kfd_init_p)(unsigned, const struct kgd2kfd_calls**);
 
@@ -61,8 +60,21 @@ int amdgpu_amdkfd_init(void)
     return ret;
 }
 
-bool amdgpu_amdkfd_load_interface(struct amdgpu_device *adev)
+void amdgpu_amdkfd_fini(void)
+{
+ if (kgd2kfd) {
+ kgd2kfd->exit();
+ symbol_put(kgd2kfd_init);
+ }
+}
+
+void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev)
 {
+ const struct kfd2kgd_calls *kfd2kgd;
+
+ if (!kgd2kfd)
+ return;
+
     switch (adev->asic_type) {
 #ifdef CONFIG_DRM_AMDGPU_CIK
     case CHIP_KAVERI:
@@ -73,25 +85,12 @@ bool amdgpu_amdkfd_load_interface(struct amdgpu_device *adev)
         kfd2kgd = amdgpu_amdkfd_gfx_8_0_get_functions();
         break;
     default:
- return false;
+ dev_info(adev->dev, "kfd not supported on this ASIC\n");
+ return;
     }
 
- return true;
-}
-
-void amdgpu_amdkfd_fini(void)
-{
- if (kgd2kfd) {
- kgd2kfd->exit();
- symbol_put(kgd2kfd_init);
- }
-}
-
-void amdgpu_amdkfd_device_probe(struct amdgpu_device *adev)
-{
- if (kgd2kfd)
- adev->kfd = kgd2kfd->probe((struct kgd_dev *)adev,
- adev->pdev, kfd2kgd);
+ adev->kfd = kgd2kfd->probe((struct kgd_dev *)adev,
+ adev->pdev, kfd2kgd);
 }
 
 void amdgpu_amdkfd_device_init(struct amdgpu_device *adev)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
index 73f83a1..b8802a5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
@@ -39,8 +39,6 @@ struct kgd_mem {
 int amdgpu_amdkfd_init(void);
 void amdgpu_amdkfd_fini(void);
 
-bool amdgpu_amdkfd_load_interface(struct amdgpu_device *adev);
-
 void amdgpu_amdkfd_suspend(struct amdgpu_device *adev);
 int amdgpu_amdkfd_resume(struct amdgpu_device *adev);
 void amdgpu_amdkfd_interrupt(struct amdgpu_device *adev,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index 9182def..33b5fe3 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -157,7 +157,6 @@ int amdgpu_driver_load_kms(struct drm_device *dev, unsigned long flags)
                 "Error during ACPI methods call\n");
     }
 
- amdgpu_amdkfd_load_interface(adev);
     amdgpu_amdkfd_device_probe(adev);
     amdgpu_amdkfd_device_init(adev);
 
--
1.9.1

As people reports AMD Radeon dual GPU cards works with ROCm OpenCL stack with patches for 4.13 kernel as has been written in the post listed below:
-----------------------------------
https://bbs.archlinux.org/viewtopic.php?pid=1761069#p1761069

Vega GPUs are meant to be supported by AMD's new open-sourced ROCm OpenCL stack, but using that requires kernel patches that haven't been mainlined yet... AMD provides a custom kernel with those patches, but based on 4.13, meaning it won't have the DC patches from 4.15, so you'll only be able to run it headless or with the full proprietary amdgpu-pro stack. Using that kernel and the rocm libraries from the 17.50 amdgpu-pro driver (namely libamdocl64.so, libhsakmt.so and libhsa-runtime64.so in /opt/amdgpu-pro/lib/x86_64-linux-gnu), I was able to get OpenCL working on my vega 64.
-----------------------------------

Thank you for your attention to the problem.

Paron
Steps To ReproduceInstall in your system AMD Radeon PRO DUO 100-506048 (Polaris) dual GPU video card and install amd gpu 17.50-552542 driver.

Next reboot you can see 'amdgpu 0000:04:00.0: kfd not supported on this ASIC' error message.
Additional InformationCan help testing any changes from Kali current to have this feature fully working in next releases.

Activities

retry-one

2018-04-28 11:32

reporter  

amdgpu-compute.sh (327 bytes)

retry-one

2018-05-04 15:17

reporter   ~0009098

Which kernel version planned for the upcoming release? Does it have kfd support implemented?

g0tmi1k

2018-10-30 11:21

administrator   ~0009865

Due to the age of the OS (Kali Moto [v1], Kali Safi [v2], Kali Rolling 2016.x/2017.x/2018.1), these legacy versions are no longer supported.
We will be closing this ticket due to inactivity.

Please could you see if you are able to replicate this issue with the latest version of Kali Linux - https://www.kali.org/downloads/)?

If you are still facing the same problem, feel free to re-open the ticket. If you choose to do this, could you provide more information to the issue you are facing, and also give information about your setup?
For more information, please read: https://kali.training/topic/filing-a-good-bug-report/

Issue History

Date Modified Username Field Change
2018-04-28 11:32 retry-one New Issue
2018-04-28 11:32 retry-one File Added: amdgpu-compute.sh
2018-05-04 15:17 retry-one Note Added: 0009098
2018-05-05 19:01 g0tmi1k Category Feature Requests => General Bug
2018-06-08 15:34 g0tmi1k Priority high => normal
2018-06-08 16:02 g0tmi1k Severity major => minor
2018-10-30 11:21 g0tmi1k Status new => closed
2018-10-30 11:21 g0tmi1k Resolution open => suspended
2018-10-30 11:21 g0tmi1k Note Added: 0009865