amd-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] drm/amdkfd: set uuid for each partition in topology
@ 2025-08-08 15:00 Eric Huang
  2025-08-12  5:51 ` Lazar, Lijo
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Huang @ 2025-08-08 15:00 UTC (permalink / raw)
  To: amd-gfx; +Cc: lijo.lazar, Eric Huang

Currently each kfd compute partition/node is sharing
the same uuid of AID, which doen't meet the CUDA spec
for visible device, so corresponding XCD id for each
partition in smu has been assigned to xcp, and exposed
to kfd topology.

v2: add NULL check (Lijo)

Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>
---
 drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
index 4ec73f33535e..82dbd68d8c99 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
@@ -530,6 +530,8 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
 		sysfs_show_32bit_prop(buffer, offs, "sdma_fw_version",
 				      dev->gpu->kfd->sdma_fw_version);
 		sysfs_show_64bit_prop(buffer, offs, "unique_id",
+				      dev->gpu->xcp ?
+				      dev->gpu->xcp->unique_id :
 				      dev->gpu->adev->unique_id);
 		sysfs_show_32bit_prop(buffer, offs, "num_xcc",
 				      NUM_XCC(dev->gpu->xcc_mask));
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] drm/amdkfd: set uuid for each partition in topology
  2025-08-08 15:00 [PATCH v2] drm/amdkfd: set uuid for each partition in topology Eric Huang
@ 2025-08-12  5:51 ` Lazar, Lijo
  0 siblings, 0 replies; 2+ messages in thread
From: Lazar, Lijo @ 2025-08-12  5:51 UTC (permalink / raw)
  To: Eric Huang, amd-gfx



On 8/8/2025 8:30 PM, Eric Huang wrote:
> Currently each kfd compute partition/node is sharing
> the same uuid of AID, which doen't meet the CUDA spec
> for visible device, so corresponding XCD id for each
> partition in smu has been assigned to xcp, and exposed
> to kfd topology.
> 
> v2: add NULL check (Lijo)
> 
> Signed-off-by: Eric Huang <jinhuieric.huang@amd.com>

Reviewed-by: Lijo Lazar <lijo.lazar@amd.com>

Thanks,
Lijo

> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> index 4ec73f33535e..82dbd68d8c99 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> @@ -530,6 +530,8 @@ static ssize_t node_show(struct kobject *kobj, struct attribute *attr,
>  		sysfs_show_32bit_prop(buffer, offs, "sdma_fw_version",
>  				      dev->gpu->kfd->sdma_fw_version);
>  		sysfs_show_64bit_prop(buffer, offs, "unique_id",
> +				      dev->gpu->xcp ?
> +				      dev->gpu->xcp->unique_id :
>  				      dev->gpu->adev->unique_id);
>  		sysfs_show_32bit_prop(buffer, offs, "num_xcc",
>  				      NUM_XCC(dev->gpu->xcc_mask));


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-08-12  5:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-08 15:00 [PATCH v2] drm/amdkfd: set uuid for each partition in topology Eric Huang
2025-08-12  5:51 ` Lazar, Lijo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).