diff --git a/projects/clr/rocclr/device/device.hpp b/projects/clr/rocclr/device/device.hpp index 2f6fd60bb8..4db476d56f 100644 --- a/projects/clr/rocclr/device/device.hpp +++ b/projects/clr/rocclr/device/device.hpp @@ -1276,7 +1276,7 @@ class Device : public RuntimeObject { typedef std::list CommandQueues; struct BlitProgram : public amd::HeapObject { - Program* program_; //!< GPU program obejct + Program* program_; //!< GPU program object Context* context_; //!< A dummy context BlitProgram(Context* context) : program_(NULL), context_(context) {} diff --git a/projects/clr/rocclr/device/gpu/gpublit.hpp b/projects/clr/rocclr/device/gpu/gpublit.hpp index 577bd3f59b..6f3135160f 100644 --- a/projects/clr/rocclr/device/gpu/gpublit.hpp +++ b/projects/clr/rocclr/device/gpu/gpublit.hpp @@ -405,7 +405,7 @@ class KernelBlitManager : public DmaBlitManager { //! Disable operator= KernelBlitManager& operator=(const KernelBlitManager&); - amd::Program* program_; //!< GPU program obejct + amd::Program* program_; //!< GPU program object amd::Kernel* kernels_[BlitTotal]; //!< GPU kernels for blit amd::Memory* constantBuffer_; //!< An internal CB for blits amd::Memory* xferBuffers_[MaxXferBuffers]; //!< Transfer buffers for images diff --git a/projects/clr/rocclr/device/gpu/gpudefs.hpp b/projects/clr/rocclr/device/gpu/gpudefs.hpp index 6f8d8b4534..74a27a58f1 100644 --- a/projects/clr/rocclr/device/gpu/gpudefs.hpp +++ b/projects/clr/rocclr/device/gpu/gpudefs.hpp @@ -83,6 +83,30 @@ static constexpr uint DeviceQueueMaskSize = 32; //! Defines all supported ASIC families enum AsicFamilies { Family7xx, Family8xx, FamilyTotal }; +// FIXME: Change to use 2 digit for major/minor/stepping. +enum gfx_handle { + gfx600 = 600, + gfx601 = 601, + gfx602 = 602, + gfx700 = 700, + gfx701 = 701, + gfx702 = 702, + gfx704 = 704, + gfx705 = 705, + gfx800 = 800, + gfx801 = 801, + gfx802 = 802, + gfx803 = 803, + gfx810 = 810, + gfx900 = 900, + gfx902 = 902, + gfx904 = 904, + gfx906 = 906, + gfx909 = 909, + gfx90c = 9012 +}; + +// FIXME: Does this need updating? struct AMDDeviceInfo { uint machine_; //!< Machine target ID const char* targetName_; //!< Target name @@ -94,9 +118,11 @@ struct AMDDeviceInfo { uint localMemSizePerCU_; //!< Local memory size per CU uint localMemBanks_; //!< Number of banks of local memory uint gfxipVersion_; //!< The core engine GFXIP version + uint gfxipMajor_; //!< The core engine GFXIP Major version + uint gfxipMinor_; //!< The core engine GFXIP Minor version + uint gfxipStepping_; //!< The core engine GFXIP Stepping version }; - static constexpr AMDDeviceInfo DeviceInfo[] = { // Machine targetName machineTarget /* CAL_TARGET_600 */ {ED_ATI_CAL_MACHINE_R600_ISA, "", "", 0, 0, 0, 0, 0, 0, 0}, @@ -108,108 +134,102 @@ static constexpr AMDDeviceInfo DeviceInfo[] = { /* CAL_TARGET_710 */ {ED_ATI_CAL_MACHINE_R710_ISA, "", "", 0, 0, 0, 0, 0, 0, 0}, /* CAL_TARGET_730 */ {ED_ATI_CAL_MACHINE_R730_ISA, "", "", 0, 0, 0, 0, 0, 0, 0}, /* CAL_TARGET_CYPRESS */ {ED_ATI_CAL_MACHINE_CYPRESS_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 32, - 400}, + 400, 4, 0, 0}, /* CAL_TARGET_JUNIPER */ {ED_ATI_CAL_MACHINE_JUNIPER_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 32, - 400}, + 400, 4, 0, 0}, /* CAL_TARGET_REDWOOD */ {ED_ATI_CAL_MACHINE_REDWOOD_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 16, - 400}, - /* CAL_TARGET_CEDAR */ {ED_ATI_CAL_MACHINE_CEDAR_ISA, "", "", 1, 8, 5, 256, 32 * Ki, 16, 400}, - /* CAL_TARGET_SUMO */ {ED_ATI_CAL_MACHINE_SUMO_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 16, 400}, + 400, 4, 0, 0}, + /* CAL_TARGET_CEDAR */ {ED_ATI_CAL_MACHINE_CEDAR_ISA, "", "", 1, 8, 5, 256, 32 * Ki, 16, 400, 4, 0, 0}, + /* CAL_TARGET_SUMO */ {ED_ATI_CAL_MACHINE_SUMO_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 16, 400, 4, 0, 0}, /* CAL_TARGET_SUPERSUMO*/ {ED_ATI_CAL_MACHINE_SUPERSUMO_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 16, - 400}, + 400, 4, 0, 0}, /* CAL_TARGET_WRESTLER*/ {ED_ATI_CAL_MACHINE_WRESTLER_ISA, "", "", 1, 8, 5, 256, 32 * Ki, 16, - 400}, + 400, 4, 0, 0}, /* CAL_TARGET_CAYMAN */ {ED_ATI_CAL_MACHINE_CAYMAN_ISA, "", "", 1, 16, 4, 256, 32 * Ki, 32, - 500}, - /* CAL_TARGET_KAUAI */ {ED_ATI_CAL_MACHINE_KAUAI_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 32, 400}, - /* CAL_TARGET_BARTS */ {ED_ATI_CAL_MACHINE_BARTS_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 32, 400}, - /* CAL_TARGET_TURKS */ {ED_ATI_CAL_MACHINE_TURKS_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 32, 400}, + 500, 5, 0, 0}, + /* CAL_TARGET_KAUAI */ {ED_ATI_CAL_MACHINE_KAUAI_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 32, 400, 4, 0, 0}, + /* CAL_TARGET_BARTS */ {ED_ATI_CAL_MACHINE_BARTS_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 32, 400, 4, 0, 0}, + /* CAL_TARGET_TURKS */ {ED_ATI_CAL_MACHINE_TURKS_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 32, 400, 4, 0, 0}, /* CAL_TARGET_CAICOS */ {ED_ATI_CAL_MACHINE_CAICOS_ISA, "", "", 1, 16, 5, 256, 32 * Ki, 32, - 400}, + 400, 4, 0, 0}, /* CAL_TARGET_TAHITI */ {ED_ATI_CAL_MACHINE_TAHITI_ISA, "Tahiti", "tahiti", 4, 16, 1, 256, - 64 * Ki, 32, 600}, + 64 * Ki, 32, gfx600, 6, 0, 0}, /* CAL_TARGET_PITCAIRN */ {ED_ATI_CAL_MACHINE_PITCAIRN_ISA, "Pitcairn", "pitcairn", 4, 16, 1, - 256, 64 * Ki, 32, 600}, + 256, 64 * Ki, 32, gfx601, 6, 0, 1}, /* CAL_TARGET_CAPEVERDE */ {ED_ATI_CAL_MACHINE_CAPEVERDE_ISA, "Capeverde", "capeverde", 4, 16, - 1, 256, 64 * Ki, 32, 600}, + 1, 256, 64 * Ki, 32, gfx601, 6, 0, 1}, /* CAL_TARGET_DEVASTATOR */ {ED_ATI_CAL_MACHINE_DEVASTATOR_ISA, "", "", 1, 16, 4, 256, 32 * Ki, - 32, 500}, + 32, 500, 5, 0, 0}, /* CAL_TARGET_SCRAPPER */ {ED_ATI_CAL_MACHINE_SCRAPPER_ISA, "", "", 1, 16, 4, 256, 32 * Ki, 32, - 500}, + 500, 5, 0, 0}, /* CAL_TARGET_OLAND */ {ED_ATI_CAL_MACHINE_OLAND_ISA, "Oland", "oland", 4, 16, 1, 256, 64 * Ki, - 32, 600}, + 32, gfx602, 6, 0, 2}, /* CAL_TARGET_BONAIRE */ {ED_ATI_CAL_MACHINE_BONAIRE_ISA, "Bonaire", "bonaire", 4, 16, 1, 256, - 64 * Ki, 32, 702}, + 64 * Ki, 32, gfx704, 7, 0, 4}, /* CAL_TARGET_SPECTRE */ {ED_ATI_CAL_MACHINE_SPECTRE_ISA, "Spectre", "spectre", 4, 16, 1, 256, - 64 * Ki, 32, 701}, + 64 * Ki, 32, gfx700, 7, 0, 0}, /* CAL_TARGET_SPOOKY */ {ED_ATI_CAL_MACHINE_SPOOKY_ISA, "Spooky", "spooky", 4, 16, 1, 256, - 64 * Ki, 32, 701}, + 64 * Ki, 32, gfx700, 7, 0, 0}, /* CAL_TARGET_KALINDI */ {ED_ATI_CAL_MACHINE_KALINDI_ISA, "Kalindi", "kalindi", 4, 16, 1, 256, - 64 * Ki, 32, 702}, + 64 * Ki, 32, gfx700, 7, 0, 0}, /* CAL_TARGET_HAINAN */ {ED_ATI_CAL_MACHINE_HAINAN_ISA, "Hainan", "hainan", 4, 16, 1, 256, - 64 * Ki, 32, 600}, + 64 * Ki, 32, gfx602, 6, 0, 2}, /* CAL_TARGET_HAWAII */ {ED_ATI_CAL_MACHINE_HAWAII_ISA, "Hawaii", "hawaii", 4, 16, 1, 256, - 64 * Ki, 32, 702}, + 64 * Ki, 32, gfx701, 7, 0, 1}, /* CAL_TARGET_ICELAND */ {ED_ATI_CAL_MACHINE_ICELAND_ISA, "Iceland", "iceland", 4, 16, 1, 256, - 64 * Ki, 32, 800}, + 64 * Ki, 32, gfx802, 8, 0, 2}, /* CAL_TARGET_TONGA */ {ED_ATI_CAL_MACHINE_TONGA_ISA, "Tonga", "tonga", 4, 16, 1, 256, 64 * Ki, - 32, 800}, + 32, gfx802, 8, 0, 2}, /* CAL_TARGET_MULLINS */ {ED_ATI_CAL_MACHINE_GODAVARI_ISA, "Mullins", "mullins", 4, 16, 1, 256, - 64 * Ki, 32, 702}, + 64 * Ki, 32, gfx705, 7, 0, 5}, /* CAL_TARGET_FIJI */ {ED_ATI_CAL_MACHINE_FIJI_ISA, "Fiji", "fiji", 4, 16, 1, 256, 64 * Ki, 32, - 800}, + gfx803, 8, 0, 3}, /* CAL_TARGET_CARRIZO */ {ED_ATI_CAL_MACHINE_CARRIZO_ISA, "Carrizo", "carrizo", 4, 16, 1, 256, - 64 * Ki, 32, 800}, + 64 * Ki, 32, gfx801, 8, 0, 1}, /* CAL_TARGET_ELLESMERE */ {ED_ATI_CAL_MACHINE_ELLESMERE_ISA, "Ellesmere", "ellesmere", 4, 16, - 1, 256, 64 * Ki, 32, 800}, + 1, 256, 64 * Ki, 32, gfx803, 8, 0, 3}, /* CAL_TARGET_BAFFIN */ {ED_ATI_CAL_MACHINE_BAFFIN_ISA, "Baffin", "baffin", 4, 16, 1, 256, - 64 * Ki, 32, 800}, + 64 * Ki, 32, gfx803, 8, 0, 3}, /* CAL_TARGET_GREENLAND */ {ED_ATI_CAL_MACHINE_GREENLAND_ISA, IF(IS_BRAHMA, "", "gfx900"), - IF(IS_BRAHMA, "", "gfx900"), 4, 16, 1, 256, 64 * Ki, 32, 900}, + IF(IS_BRAHMA, "", "gfx900"), 4, 16, 1, 256, 64 * Ki, 32, gfx900, 9, 0, 0}, /* CAL_TARGET_STONEY */ {ED_ATI_CAL_MACHINE_STONEY_ISA, "Stoney", "stoney", 4, 16, 1, 256, - 64 * Ki, 32, 800}, - /* CAL_TARGET_LEXA */ {ED_ATI_CAL_MACHINE_LEXA_ISA, "gfx804", "gfx804", 4, 16, 1, 256, 64 * Ki, - 32, 800}, + 64 * Ki, 32, gfx810, 8, 1, 0}, + /* CAL_TARGET_LEXA */ {ED_ATI_CAL_MACHINE_LEXA_ISA, "gfx803", "gfx803", 4, 16, 1, 256, 64 * Ki, + 32, gfx803, 8, 0, 3}, /* CAL_TARGET_RAVEN */ {ED_ATI_CAL_MACHINE_RAVEN_ISA, IF(IS_BRAHMA, "", "gfx902"), - IF(IS_BRAHMA, "", "gfx902"), 4, 16, 1, 256, 64 * Ki, 32, 900}, - /* CAL_TARGET_RAVEN2 */ {ED_ATI_CAL_MACHINE_RAVEN2_ISA, IF(IS_BRAHMA, "", "gfx902"), - IF(IS_BRAHMA, "", "gfx902"), 4, 16, 1, 256, 64 * Ki, 32, 900}, - /* CAL_TARGET_RENOIR */{ ED_ATI_CAL_MACHINE_RENOIR_ISA, IF(IS_BRAHMA, "", "gfx902"), - IF(IS_BRAHMA, "", "gfx902"), 4, 16, 1, 256, 64 * Ki, 32, 900 }, - /* CAL_TARGET_POLARIS22 */ {ED_ATI_CAL_MACHINE_POLARIS22_ISA, IF(IS_BRAHMA, "", "gfx804"), - IF(IS_BRAHMA, "", "gfx804"), 4, 16, 1, 256, 64 * Ki, 32, 800}, + IF(IS_BRAHMA, "", "gfx902"), 4, 16, 1, 256, 64 * Ki, 32, gfx902, 9, 0, 2}, + /* CAL_TARGET_RAVEN2 */ {ED_ATI_CAL_MACHINE_RAVEN2_ISA, IF(IS_BRAHMA, "", "gfx909"), + IF(IS_BRAHMA, "", "gfx902"), 4, 16, 1, 256, 64 * Ki, 32, gfx909, 9, 0, 9}, + /* CAL_TARGET_RENOIR */{ ED_ATI_CAL_MACHINE_RENOIR_ISA, IF(IS_BRAHMA, "", "gfx90c"), + IF(IS_BRAHMA, "", "gfx90c"), 4, 16, 1, 256, 64 * Ki, 32, gfx90c, 9, 0, 12}, + /* CAL_TARGET_POLARIS22 */ {ED_ATI_CAL_MACHINE_POLARIS22_ISA, IF(IS_BRAHMA, "", "gfx803"), + IF(IS_BRAHMA, "", "gfx803"), 4, 16, 1, 256, 64 * Ki, 32, gfx803, 8, 0, 3}, /* CAL_TARGET_VEGA12 */{ ED_ATI_CAL_MACHINE_VEGA12_ISA, IF(IS_BRAHMA, "", "gfx904"), - IF(IS_BRAHMA, "", "gfx904"), 4, 16, 1, 256, 64 * Ki, 32, 900 }, + IF(IS_BRAHMA, "", "gfx904"), 4, 16, 1, 256, 64 * Ki, 32, gfx904, 9, 0, 4}, /* CAL_TARGET_VEGA20 */{ ED_ATI_CAL_MACHINE_VEGA20_ISA, IF(IS_BRAHMA, "", "gfx906"), - IF(IS_BRAHMA, "", "gfx906"), 4, 16, 1, 256, 64 * Ki, 32, 900 }, -}; - -enum gfx_handle { - gfx700 = 700, - gfx701 = 701, - gfx702 = 702, - gfx800 = 800, - gfx801 = 801, - gfx804 = 804, - gfx810 = 810, - gfx900 = 900, - gfx902 = 902, - gfx903 = 903, - gfx904 = 904, - gfx906 = 906 + IF(IS_BRAHMA, "", "gfx906"), 4, 16, 1, 256, 64 * Ki, 32, gfx906, 9, 0, 6 }, }; +// FIXME: These need updating to new Target ID format. Or is all this code nw +// obsolete and should be deleted? How is XNACK and SRAMECC settings supported? +static constexpr const char* Gfx600 = "amdgcn-amd-amdhsa--gfx600"; +static constexpr const char* Gfx601 = "amdgcn-amd-amdhsa--gfx601"; +static constexpr const char* Gfx602 = "amdgcn-amd-amdhsa--gfx602"; static constexpr const char* Gfx700 = "amdgcn-amd-amdhsa--gfx700"; static constexpr const char* Gfx701 = "amdgcn-amd-amdhsa--gfx701"; -static constexpr const char* Gfx800 = "amdgcn-amd-amdhsa--gfx801:xnack-"; +static constexpr const char* Gfx702 = "amdgcn-amd-amdhsa--gfx702"; +static constexpr const char* Gfx704 = "amdgcn-amd-amdhsa--gfx704"; +static constexpr const char* Gfx705 = "amdgcn-amd-amdhsa--gfx705"; static constexpr const char* Gfx801 = "amdgcn-amd-amdhsa--gfx801:xnack+"; -static constexpr const char* Gfx804 = "amdgcn-amd-amdhsa--gfx803"; +static constexpr const char* Gfx802 = "amdgcn-amd-amdhsa--gfx802"; +static constexpr const char* Gfx803 = "amdgcn-amd-amdhsa--gfx803"; static constexpr const char* Gfx810 = "amdgcn-amd-amdhsa--gfx810:xnack+"; static constexpr const char* Gfx900 = "amdgcn-amd-amdhsa--gfx900:xnack-"; -static constexpr const char* Gfx902 = "amdgcn-amd-amdhsa--gfx902:xnack-"; -static constexpr const char* Gfx903 = "amdgcn-amd-amdhsa--gfx903:xnack+"; // NOTE: gfx903 is gfx902 with xnack +static constexpr const char* Gfx902 = "amdgcn-amd-amdhsa--gfx902:xnack+"; static constexpr const char* Gfx904 = "amdgcn-amd-amdhsa--gfx904:xnack-"; static constexpr const char* Gfx906 = "amdgcn-amd-amdhsa--gfx906:xnack-"; +static constexpr const char* Gfx909 = "amdgcn-amd-amdhsa--gfx909:xnack+"; +static constexpr const char* Gfx90c = "amdgcn-amd-amdhsa--gfx90c:xnack+"; // Supported OpenCL versions enum OclVersion { OpenCL10, OpenCL11, OpenCL12, OpenCL20, OpenCL21 }; diff --git a/projects/clr/rocclr/device/gpu/gpudevice.cpp b/projects/clr/rocclr/device/gpu/gpudevice.cpp index 176ce6677f..35537858b3 100644 --- a/projects/clr/rocclr/device/gpu/gpudevice.cpp +++ b/projects/clr/rocclr/device/gpu/gpudevice.cpp @@ -594,9 +594,9 @@ void NullDevice::fillDeviceInfo(const CALdeviceattribs& calAttr, const gslMemInf info_.globalMemChannelBankWidth_ = hwInfo()->memChannelBankWidth_; info_.localMemSizePerCU_ = hwInfo()->localMemSizePerCU_; info_.localMemBanks_ = hwInfo()->localMemBanks_; - info_.gfxipMajor_ = hwInfo()->gfxipVersion_ / 100; - info_.gfxipMinor_ = hwInfo()->gfxipVersion_ / 10 % 10; - info_.gfxipStepping_ = hwInfo()->gfxipVersion_ % 10; + info_.gfxipMajor_ = hwInfo()->gfxipMajor_; + info_.gfxipMinor_ = hwInfo()->gfxipMinor_; + info_.gfxipStepping_ = hwInfo()->gfxipStepping_; info_.numAsyncQueues_ = numComputeRings; diff --git a/projects/clr/rocclr/device/gpu/gpuprogram.cpp b/projects/clr/rocclr/device/gpu/gpuprogram.cpp index 2a0ae55bfc..b35f9e599d 100644 --- a/projects/clr/rocclr/device/gpu/gpuprogram.cpp +++ b/projects/clr/rocclr/device/gpu/gpuprogram.cpp @@ -1793,6 +1793,18 @@ bool HSAILProgram::saveBinaryAndSetType(type_t type) { hsa_isa_t ORCAHSALoaderContext::IsaFromName(const char* name) { hsa_isa_t isa = {0}; + if (!strcmp(Gfx600, name)) { + isa.handle = gfx600; + return isa; + } + if (!strcmp(Gfx601, name)) { + isa.handle = gfx601; + return isa; + } + if (!strcmp(Gfx602, name)) { + isa.handle = gfx602; + return isa; + } if (!strcmp(Gfx700, name)) { isa.handle = gfx700; return isa; @@ -1801,16 +1813,24 @@ hsa_isa_t ORCAHSALoaderContext::IsaFromName(const char* name) { isa.handle = gfx701; return isa; } - if (!strcmp(Gfx800, name)) { - isa.handle = gfx800; + if (!strcmp(Gfx702, name)) { + isa.handle = gfx702; + return isa; + } + if (!strcmp(Gfx705, name)) { + isa.handle = gfx702; return isa; } if (!strcmp(Gfx801, name)) { isa.handle = gfx801; return isa; } - if (!strcmp(Gfx804, name)) { - isa.handle = gfx804; + if (!strcmp(Gfx802, name)) { + isa.handle = gfx802; + return isa; + } + if (!strcmp(Gfx803, name)) { + isa.handle = gfx803; return isa; } if (!strcmp(Gfx810, name)) { @@ -1825,10 +1845,6 @@ hsa_isa_t ORCAHSALoaderContext::IsaFromName(const char* name) { isa.handle = gfx902; return isa; } - if (!strcmp(Gfx903, name)) { - isa.handle = gfx903; - return isa; - } if (!strcmp(Gfx904, name)) { isa.handle = gfx904; return isa; @@ -1837,62 +1853,45 @@ hsa_isa_t ORCAHSALoaderContext::IsaFromName(const char* name) { isa.handle = gfx906; return isa; } + if (!strcmp(Gfx909, name)) { + isa.handle = gfx909; + return isa; + } + if (!strcmp(Gfx90c, name)) { + isa.handle = gfx90c; + return isa; + } - LogPrintfError("Couldn't find: %s!", name); return isa; } bool ORCAHSALoaderContext::IsaSupportedByAgent(hsa_agent_t agent, hsa_isa_t isa) { - switch (program_->dev().hwInfo()->gfxipVersion_) { - default: - LogError("Unsupported gfxip version"); - return false; + uint dev_gfxip = program_->dev().hwInfo()->gfxipVersion_; + uint isa_gfxip = isa.handle; + switch (dev_gfxip) { case gfx700: - return isa.handle == gfx700; + case gfx704: + case gfx801: + case gfx802: + case gfx803: + case gfx810: + case gfx900: + case gfx902: + case gfx904: + case gfx906: + case gfx909: + case gfx90c: + return isa_gfxip == dev_gfxip; case gfx701: case gfx702: // gfx701 only differs from gfx702 by faster fp operations and can be loaded on either device. - return isa.handle == gfx701 || isa.handle == gfx702; - case gfx800: - switch (program_->dev().hwInfo()->machine_) { - case ED_ATI_CAL_MACHINE_ICELAND_ISA: - case ED_ATI_CAL_MACHINE_TONGA_ISA: - return isa.handle == gfx800; - case ED_ATI_CAL_MACHINE_CARRIZO_ISA: - return isa.handle == gfx801; - case ED_ATI_CAL_MACHINE_FIJI_ISA: - case ED_ATI_CAL_MACHINE_ELLESMERE_ISA: - case ED_ATI_CAL_MACHINE_BAFFIN_ISA: - case ED_ATI_CAL_MACHINE_LEXA_ISA: - case ED_ATI_CAL_MACHINE_POLARIS22_ISA: - // gfx800 ISA has only sgrps limited and can be loaded. - // gfx801 ISA has XNACK limitations and can be loaded. - return isa.handle == gfx800 || isa.handle == gfx801 || isa.handle == gfx804; - case ED_ATI_CAL_MACHINE_STONEY_ISA: - return isa.handle == gfx810; - default: - assert(0); - return false; - } - case gfx900: - case gfx902: - case gfx903: - case gfx904: - case gfx906: - switch (program_->dev().hwInfo()->machine_) { - case ED_ATI_CAL_MACHINE_GREENLAND_ISA: - return isa.handle == gfx900; - case ED_ATI_CAL_MACHINE_RAVEN_ISA: - case ED_ATI_CAL_MACHINE_RENOIR_ISA: - return isa.handle == gfx902 || isa.handle == gfx903; - case ED_ATI_CAL_MACHINE_VEGA12_ISA: - return isa.handle == gfx904; - case ED_ATI_CAL_MACHINE_VEGA20_ISA: - return isa.handle == gfx906; - default: - assert(0); - return false; - } + return isa_gfxip == gfx701|| isa_gfxip == gfx702; + case gfx600: + case gfx601: + case gfx602: + default: + LogPrintfError("Unsupported gfxip version gfx%d", dev_gfxip); + return false; } } diff --git a/projects/clr/rocclr/device/pal/palblit.hpp b/projects/clr/rocclr/device/pal/palblit.hpp index afb282f661..9f1198c0c8 100644 --- a/projects/clr/rocclr/device/pal/palblit.hpp +++ b/projects/clr/rocclr/device/pal/palblit.hpp @@ -417,7 +417,7 @@ class KernelBlitManager : public DmaBlitManager { //! Disable operator= KernelBlitManager& operator=(const KernelBlitManager&); - amd::Program* program_; //!< GPU program obejct + amd::Program* program_; //!< GPU program object amd::Kernel* kernels_[BlitTotal]; //!< GPU kernels for blit amd::Memory* xferBuffers_[MaxXferBuffers]; //!< Transfer buffers for images size_t xferBufferSize_; //!< Transfer buffer size diff --git a/projects/clr/rocclr/device/rocm/rocblit.hpp b/projects/clr/rocclr/device/rocm/rocblit.hpp index ee6c3420a1..c4f4b89ba9 100644 --- a/projects/clr/rocclr/device/rocm/rocblit.hpp +++ b/projects/clr/rocclr/device/rocm/rocblit.hpp @@ -463,7 +463,7 @@ class KernelBlitManager : public DmaBlitManager { //! Disable operator= KernelBlitManager& operator=(const KernelBlitManager&); - amd::Program* program_; //!< GPU program obejct + amd::Program* program_; //!< GPU program object amd::Kernel* kernels_[BlitTotal]; //!< GPU kernels for blit amd::Memory* constantBuffer_; //!< An internal CB for blits mutable uint32_t constantBufferOffset_; //!< Current offset in the constant buffer