From 96f975a9598962afbf4ad083775d2b6875b0d47e Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Wed, 13 Nov 2024 15:18:49 -0500 Subject: [PATCH] SWDEV-454108 - Add the support for `gfx9-4-generic` in `comgr` and `device-libs` Change-Id: I3d83215c96d62f077575b6cd2785000cb6f19cdc --- amd/comgr/docs/ReleaseNotes.md | 1 + amd/comgr/src/comgr-isa-metadata.def | 1 + amd/comgr/test/get_data_isa_name_test.c | 1 + amd/device-libs/oclc/src/isa_version_9-4-generic.cl | 13 +++++++++++++ 4 files changed, 16 insertions(+) create mode 100644 amd/device-libs/oclc/src/isa_version_9-4-generic.cl diff --git a/amd/comgr/docs/ReleaseNotes.md b/amd/comgr/docs/ReleaseNotes.md index 9489cda03a853b..c45b1e81d102cb 100644 --- a/amd/comgr/docs/ReleaseNotes.md +++ b/amd/comgr/docs/ReleaseNotes.md @@ -220,6 +220,7 @@ New Targets - gfx1151 - gfx1152 - gfx9-generic + - gfx9-4-generic - gfx10-1-generic - gfx10-3-generic - gfx11-generic diff --git a/amd/comgr/src/comgr-isa-metadata.def b/amd/comgr/src/comgr-isa-metadata.def index 2cdc8984f8387d..3fdbac9af662f3 100644 --- a/amd/comgr/src/comgr-isa-metadata.def +++ b/amd/comgr/src/comgr-isa-metadata.def @@ -94,6 +94,7 @@ HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1200", false, false, EF_AMDGPU_MAC HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx1201", false, false, EF_AMDGPU_MACH_AMDGCN_GFX1201, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 24, 1536, 256) HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx9-generic", false, true, EF_AMDGPU_MACH_AMDGCN_GFX9_GENERIC, true, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) +HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx9-4-generic", true, true, EF_AMDGPU_MACH_AMDGCN_GFX9_4_GENERIC, true, 65536, 32, 4, 40, 1024, 16, 800, 102, 4, 256, 256) HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx10-1-generic", false, true, EF_AMDGPU_MACH_AMDGCN_GFX10_1_GENERIC, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 8, 256, 256) HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx10-3-generic", false, false, EF_AMDGPU_MACH_AMDGCN_GFX10_3_GENERIC, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 8, 256, 256) HANDLE_ISA("amdgcn-amd-amdhsa-", "gfx11-generic", false, false, EF_AMDGPU_MACH_AMDGCN_GFX11_GENERIC, true, 65536, 32, 4, 40, 1024, 106, 800, 106, 16, 1024, 256) diff --git a/amd/comgr/test/get_data_isa_name_test.c b/amd/comgr/test/get_data_isa_name_test.c index 3a8a1cf0ae2bd2..e57fe1ca2e8864 100644 --- a/amd/comgr/test/get_data_isa_name_test.c +++ b/amd/comgr/test/get_data_isa_name_test.c @@ -111,6 +111,7 @@ static isa_features_t IsaFeatures[] = { {"amdgcn-amd-amdhsa--gfx1201", false, false, none, false, none, false}, {"amdgcn-amd-amdhsa--gfx9-generic", true, false, none, true, any, true}, + {"amdgcn-amd-amdhsa--gfx9-4-generic", false, true, none, true, none, true}, {"amdgcn-amd-amdhsa--gfx10-1-generic", false, false, none, true, none, true}, {"amdgcn-amd-amdhsa--gfx10-3-generic", false, false, none, false, none, true}, {"amdgcn-amd-amdhsa--gfx11-generic", false, false, none, false, none, true}, diff --git a/amd/device-libs/oclc/src/isa_version_9-4-generic.cl b/amd/device-libs/oclc/src/isa_version_9-4-generic.cl new file mode 100644 index 00000000000000..ba8f51c4c58a14 --- /dev/null +++ b/amd/device-libs/oclc/src/isa_version_9-4-generic.cl @@ -0,0 +1,13 @@ +/*===-------------------------------------------------------------------------- + * ROCm Device Libraries + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + *===------------------------------------------------------------------------*/ + +#include "oclc.h" + +// gfx9-4-generic matches gfx942 from the device-lib perspective. +// NOTE: gfx942 has fp8 instructions, fp8 conversion instructions, and support +// for xf32 format, while the gfx9-4-generic doesn't. +const __constant int __oclc_ISA_version = 9402;