Apply constexpr on global constant varaibles
When HIP_ENABLE_DEFERRED_LOADING=0, many global variables will be
referenced but they are not initialized in that early time. The patch
will use constexpr to initialze global constant varables in compile
time.
Change-Id: I9d538b7abc6a0ce700ec3332b97fc144db5fc1ef
[ROCm/clr commit: fdef6f722f]
This commit is contained in:
gecommit door
Tao Sang
bovenliggende
11f8a869f1
commit
44eb207f8d
@@ -37,7 +37,7 @@
|
||||
namespace device {
|
||||
|
||||
// ================================================================================================
|
||||
static const clk_value_type_t ClkValueMapType[6][6] = {
|
||||
static constexpr clk_value_type_t ClkValueMapType[6][6] = {
|
||||
{T_CHAR, T_CHAR2, T_CHAR3, T_CHAR4, T_CHAR8, T_CHAR16},
|
||||
{T_SHORT, T_SHORT2, T_SHORT3, T_SHORT4, T_SHORT8, T_SHORT16},
|
||||
{T_INT, T_INT2, T_INT3, T_INT4, T_INT8, T_INT16},
|
||||
@@ -465,7 +465,6 @@ static amd_comgr_status_t populateKernelMetaV3(const amd_comgr_metadata_node_t k
|
||||
amd_comgr_metadata_kind_t kind;
|
||||
size_t size = 0;
|
||||
std::string buf;
|
||||
|
||||
// get the key of the argument field
|
||||
status = amd::Comgr::get_metadata_kind(key, &kind);
|
||||
if (kind == AMD_COMGR_METADATA_KIND_STRING && status == AMD_COMGR_STATUS_SUCCESS) {
|
||||
|
||||
Verwijs in nieuw issue
Block a user