amdgpu: Enable KFD on POWER systems
Subsystems (3)
PATCH 1/1 amdgpu: Enable KFD on POWER systems
KFD has been verified to function on POWER systems (Talos II / Vega 64). It should be available as a kernel configuration option on these systems.
--- drivers/gpu/drm/amd/amdkfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdkfd/Kconfig +1 -1
@@ -5,7 +5,7 @@ config HSA_AMD bool "HSA kernel driver for AMD GPU devices" - depends on DRM_AMDGPU && (X86_64 || ARM64) + depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64) imply AMD_IOMMU_V2 if X86_64 select MMU_NOTIFIER help
Signature · 5 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 2068915477.1923611.1574622916022.JavaMail.zimbra-z0qzliK6Om0mgXJStvpl+u2xl0RS173n@public.gmane.org
Alex Deucher
AppliedQuoted 5 lines · Timothy Pearson
KFD has been verified to function on POWER systems (Talos II / Vega 64). It should be available as a kernel configuration option on these systems.
Signed-off-by Timothy Pearson <[email protected]>
Applied. Thanks!
Alex
Quoted 18 lines
--- drivers/gpu/drm/amd/amdkfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/Kconfig +1
-2@@ -5,7 +5,7 @@ config HSA_AMD bool "HSA kernel driver for AMD GPU devices" - depends on DRM_AMDGPU && (X86_64 || ARM64) + depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64) imply AMD_IOMMU_V2 if X86_64 select MMU_NOTIFIER help --
Quoted 5 lines
2.20.1
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Hi Timothy,
Thank you for the patch and for confirming that it works. We did some experimental work on Power8 a few years ago. I see that Talos II is Power9.
At the time we were working on Power8 we had to add some #ifdef CONFIG_ACPI guards around some ACPI-specific code in KFD. Do you know to what extent ACPI is available and working on the Power architecture?
Another problem we ran into with Power, is the physical address map. System memory can be a physical addresses outside the range accessible by the GPU. Vega has 44-bit physical addressing. Older Polaris GPUs only have 40-bits. Did you run into any such problems? Do you need an IOMMU to make system memory accessible to the GPU?
Regards,
Felix
Quoted 13 lines · Timothy Pearson
KFD has been verified to function on POWER systems (Talos II / Vega 64). It should be available as a kernel configuration option on these systems.
Signed-off-by Timothy Pearson <[email protected]>--- drivers/gpu/drm/amd/amdkfd/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/amd/amdkfd/Kconfig +0
-0
drivers/gpu/drm/amd/amdkfd/Kconfig line 11
Quoted 8 lines
drivers/gpu/drm/amd/amdkfd/Kconfig +1
-1@@ -5,7 +5,7 @@ config HSA_AMD bool "HSA kernel driver for AMD GPU devices" - depends on DRM_AMDGPU && (X86_64 || ARM64) + depends on DRM_AMDGPU && (X86_64 || ARM64 || PPC64) imply AMD_IOMMU_V2 if X86_64 select MMU_NOTIFIER help
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 44175d39-e507-83f9-6596-cbde108dd65a-5C7GfCeVMHo@public.gmane.org
----- Original Message -----
Quoted 14 lines
From: "Felix Kuehling" <[email protected]>
To: "Timothy Pearson" <[email protected]>, "amd-gfx" <[email protected]>
Sent: Monday, November 25, 2019 11:07:31 AM
Subject: Re: [PATCH 1/1] amdgpu: Enable KFD on POWER systemsHi Timothy,
Thank you for the patch and for confirming that it works. We did some experimental work on Power8 a few years ago. I see that Talos II is Power9.
At the time we were working on Power8 we had to add some #ifdef
CONFIG_ACPIguards around some ACPI-specific code in KFD. Do you know to what extent ACPI is available and working on the Power architecture?
Quoted 8 lines
Another problem we ran into with Power, is the physical address map. System memory can be a physical addresses outside the range accessible by the GPU. Vega has 44-bit physical addressing. Older Polaris GPUs only have 40-bits. Did you run into any such problems? Do you need an IOMMU to make system memory accessible to the GPU?
Regards,
Felix
Yes, we are POWER9. It looks like the ACPI guards are no longer required; as you have surmised, POWER does not use ACPI (the equivalent is OPAL, which is a different interface entirely). What were the APCI calls used for? There may be OPAL equivalents that could be added in to replace them and provide similar functionality.
Kernel 5.4 enables a > 32-bit and <=64-bit bypass mode for POWER. This is one reason we came back and revisited the KFD/ROCm functionality on POWER; as it turns out, after fixing up the userspace tools KFD is indeed functional on POWER with 5.4-rc8 and above. My understanding is that the POWER IOMMU is used as a lightweight translation layer between the 64-bit host and the 40/44-bit GPU.
I'm working on getting a Debian PPA set up for POWER to make the userspace tools easier to obtain for testing, but progress is slow due to lack of Debian source packages. Probably the easiest way to replicate / test this with HIP is to use the AOMP repository with my modifications; pull requests are already in place on Github for most of the userspace tooling updates.
Thank you!
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 535694171.2118031.1574716002431.JavaMail.zimbra-z0qzliK6Om0mgXJStvpl+u2xl0RS173n@public.gmane.org
Quoted 21 lines · Timothy Pearson
----- Original Message -----
Quoted 19 lines
From: "Felix Kuehling" <[email protected]>
To: "Timothy Pearson" <[email protected]>, "amd-gfx" <[email protected]>
Sent: Monday, November 25, 2019 11:07:31 AM
Subject: Re: [PATCH 1/1] amdgpu: Enable KFD on POWER systems
Hi Timothy,Thank you for the patch and for confirming that it works. We did some experimental work on Power8 a few years ago. I see that Talos II is Power9.
At the time we were working on Power8 we had to add some #ifdef
CONFIG_ACPIguards around some ACPI-specific code in KFD. Do you know to what extent ACPI is available and working on the Power architecture?Another problem we ran into with Power, is the physical address map. System memory can be a physical addresses outside the range accessible by the GPU. Vega has 44-bit physical addressing. Older Polaris GPUs only have 40-bits. Did you run into any such problems? Do you need an IOMMU to make system memory accessible to the GPU?
Quoted 3 lines
Quoted 2 lines
Regards,
FelixYes, we are POWER9. It looks like the ACPI guards are no longer required; as you have surmised, POWER does not use ACPI (the equivalent is OPAL, which is a different interface entirely). What were the APCI calls used for? There may be OPAL equivalents that could be added in to replace them and provide similar functionality.
There are some ACPI calls (e.g. acpi_get_table) in kfd_crat.c for getting a CRAT table from ACPI. This is only useful for AMD APUs, which are x86_64. We don't need this for discrete GPUs because on non-APU systems there is no CRAT table and we build our own. If you can compile the code without problems on Power and with CONFIG_ACPI not defined, then I guess this is no longer an issue.
Quoted 5 lines
Kernel 5.4 enables a > 32-bit and <=64-bit bypass mode for POWER. This is one reason we came back and revisited the KFD/ROCm functionality on POWER; as it turns out, after fixing up the userspace tools KFD is indeed functional on POWER with 5.4-rc8 and above. My understanding is that the POWER IOMMU is used as a lightweight translation layer between the 64-bit host and the 40/44-bit GPU.
I'm working on getting a Debian PPA set up for POWER to make the userspace tools easier to obtain for testing, but progress is slow due to lack of Debian source packages. Probably the easiest way to replicate / test this with HIP is to use the AOMP repository with my modifications; pull requests are already in place on Github for most of the userspace tooling updates.
Thank you!
Thanks,
Felix
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 5dcfdba7-dc14-99d4-d6e5-fc1768fcc5c0-5C7GfCeVMHo@public.gmane.org
----- Original Message -----
Quoted 37 lines
From: "Felix Kuehling" <[email protected]>
To: "Timothy Pearson" <[email protected]>
Cc: "amd-gfx" <[email protected]>
Sent: Monday, November 25, 2019 3:34:20 PM
Subject: Re: [PATCH 1/1] amdgpu: Enable KFD on POWER systemsQuoted 22 lines · Timothy Pearson
----- Original Message -----
Quoted 20 lines
From: "Felix Kuehling" <[email protected]>
To: "Timothy Pearson" <[email protected]>, "amd-gfx" <[email protected]>
Sent: Monday, November 25, 2019 11:07:31 AM
Subject: Re: [PATCH 1/1] amdgpu: Enable KFD on POWER systems Hi Timothy,Thank you for the patch and for confirming that it works. We did some experimental work on Power8 a few years ago. I see that Talos II is Power9.
At the time we were working on Power8 we had to add some #ifdef
CONFIG_ACPIguards around some ACPI-specific code in KFD. Do you know to what extent ACPI is available and working on the Power architecture?Another problem we ran into with Power, is the physical address map. System memory can be a physical addresses outside the range accessible by the GPU. Vega has 44-bit physical addressing. Older Polaris GPUs only have 40-bits. Did you run into any such problems? Do you need an IOMMU to make system memory accessible to the GPU?
Quoted 7 lines
Quoted 2 lines
Regards,
FelixYes, we are POWER9. It looks like the ACPI guards are no longer required; as you have surmised, POWER does not use ACPI (the equivalent is OPAL, which is a different interface entirely). What were the APCI calls used for? There may be OPAL equivalents that could be added in to replace them and provide similar functionality.
Quoted 6 lines
There are some ACPI calls (e.g.
acpi_get_table) inkfd_crat.cfor getting a CRAT table from ACPI. This is only useful for AMD APUs, which arex86_64. We don't need this for discrete GPUs because on non-APU systems there is no CRAT table and we build our own. If you can compile the code without problems on Power and withCONFIG_ACPInot defined, then I guess this is no longer an issue.
Sounds reasonable -- yes, it compiles without issue so I think we're good to go.
Quoted 15 lines
Quoted 8 lines
Kernel 5.4 enables a > 32-bit and <=64-bit bypass mode for POWER. This is one reason we came back and revisited the KFD/ROCm functionality on POWER; as it turns out, after fixing up the userspace tools KFD is indeed functional on POWER with 5.4-rc8 and above. My understanding is that the POWER IOMMU is used as a lightweight translation layer between the 64-bit host and the 40/44-bit GPU.
Quoted 7 lines
I'm working on getting a Debian PPA set up for POWER to make the userspace tools easier to obtain for testing, but progress is slow due to lack of Debian source packages. Probably the easiest way to replicate / test this with HIP is to use the AOMP repository with my modifications; pull requests are already in place on Github for most of the userspace tooling updates.
Thank you!
Quoted 8 lines
Thanks,
Felix_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx