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
Tá an tiomantas seo le fáil i:
Tao Sang údaraithe agus Tao Sang tiomanta 2020-07-22 22:14:13 -04:00
1 tuismitheoir 2800fc2fa3
tiomantas fdef6f722f
62 comhad athraithe
+224 -227

Níor tháinig aon chomhaid le do chuardach

-2
Féach ar an gComhad
@@ -68,8 +68,6 @@ bool roc::Device::isHsaInitialized_ = false;
std::vector<hsa_agent_t> roc::Device::gpu_agents_;
std::vector<AgentInfo> roc::Device::cpu_agents_;
const bool roc::Device::offlineDevice_ = false;
const bool roc::NullDevice::offlineDevice_ = true;
address Device::mg_sync_ = nullptr;
static HsaDeviceId getHsaDeviceId(hsa_agent_t device, uint32_t& pci_id) {