[PATCH] drm/amdkfd: set uuid for each partition in topology

Lazar, Lijo lijo.lazar at amd.com
Fri Aug 8 06:59:04 UTC 2025



On 8/8/2025 2:19 AM, 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.
> 
> Signed-off-by: Eric Huang <jinhuieric.huang at amd.com>
> ---
>  drivers/gpu/drm/amd/amdkfd/kfd_topology.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> index 4ec73f33535e..14b5fa670727 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_topology.c
> @@ -530,7 +530,7 @@ 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->adev->unique_id);
> +				      dev->gpu->xcp->unique_id);

This needs a NULL check. If KFD has xcp, use its id; else show from the
device.

Thanks,
Lijo

>  		sysfs_show_32bit_prop(buffer, offs, "num_xcc",
>  				      NUM_XCC(dev->gpu->xcc_mask));
>  	}



More information about the amd-gfx mailing list