Add Size of VGPR and SGPR to HsaNodeProperties

Signed-off-by: Mike Li <Tianxinmike.Li@amd.com>
Change-Id: I7e6c0c5b9fd90c0bb5f3b7d35362a073afdcf9b8


[ROCm/ROCR-Runtime commit: 47ccc6604d]
此提交包含在:
Mike Li
2021-04-23 09:47:48 -04:00
父節點 5c323f2611
當前提交 a8ceb5c406
共有 5 個檔案被更改,包括 21 行新增4 行删除
+5
查看文件
@@ -212,4 +212,9 @@ void clear_process_doorbells(void);
uint32_t get_num_sysfs_nodes(void);
bool is_forked_child(void);
/* Calculate VGPR and SGPR register file size per CU */
#define VGPR_SIZE_PER_CU(asic_family) ((asic_family == CHIP_ARCTURUS || \
asic_family == CHIP_ALDEBARAN) ? 0x80000 : 0x40000)
#define SGPR_SIZE_PER_CU 0x4000
#endif
-3
查看文件
@@ -42,9 +42,6 @@
#define DOORBELL_SIZE_GFX9 8
#define DOORBELLS_PAGE_SIZE(ds) (1024 * (ds))
#define VGPR_SIZE_PER_CU(asic_family) ((asic_family == CHIP_ARCTURUS || \
asic_family == CHIP_ALDEBARAN) ? 0x80000 : 0x40000)
#define SGPR_SIZE_PER_CU 0x4000
#define LDS_SIZE_PER_CU 0x10000
#define HWREG_SIZE_PER_CU 0x1000
#define WG_CONTEXT_DATA_SIZE_PER_CU(asic_family) (VGPR_SIZE_PER_CU(asic_family) + SGPR_SIZE_PER_CU + LDS_SIZE_PER_CU + HWREG_SIZE_PER_CU)
+5
查看文件
@@ -1103,6 +1103,11 @@ HSAKMT_STATUS topology_sysfs_get_node_props(uint32_t node_id,
props->MarketingName[i] = name[i];
props->MarketingName[i] = '\0';
}
/* Get VGPR/SGPR size in byte per CU */
props->VGPRSizePerCU = VGPR_SIZE_PER_CU(hsa_gfxip->asic_family);
props->SGPRSizePerCU = SGPR_SIZE_PER_CU;
} else if (props->DeviceId)
/* still return success */
pr_err("device ID 0x%x is not supported in libhsakmt\n",