Extend ROCr to surface UUID of GPU devices that suppport

Change-Id: I478db68d69a01578770403fa695f9e6391637573
Cette révision appartient à :
Ramesh Errabolu a créé et Sean Keely a révisé 2020-04-08 19:19:22 -05:00
1 Parent 241cdfdd01
révision 45958c727d
7 fichiers modifiés
+61 -5

Aucun fichier ne correspond à votre recherche

+3
Voir le fichier
@@ -72,6 +72,7 @@ class Flag {
enable_sdma_ = os::GetEnvVar("HSA_ENABLE_SDMA");
visible_gpus_ = os::GetEnvVar("ROCR_VISIBLE_DEVICES");
filter_visible_gpus_ = os::IsEnvVarSet("ROCR_VISIBLE_DEVICES");
var = os::GetEnvVar("HSA_RUNNING_UNDER_VALGRIND");
running_valgrind_ = (var == "1") ? true : false;
@@ -143,6 +144,7 @@ class Flag {
std::string enable_sdma() const { return enable_sdma_; }
std::string visible_gpus() const { return visible_gpus_; }
bool filter_visible_gpus() const { return filter_visible_gpus_; }
uint32_t max_queues() const { return max_queues_; }
@@ -167,6 +169,7 @@ class Flag {
std::string enable_sdma_;
bool filter_visible_gpus_;
std::string visible_gpus_;
uint32_t max_queues_;
+6
Voir le fichier
@@ -237,6 +237,12 @@ bool WaitForAllThreads(Thread* threads, uint threadCount) {
return true;
}
bool IsEnvVarSet(std::string env_var_name) {
char* buff = NULL;
buff = getenv(env_var_name.c_str());
return (buff != NULL);
}
void SetEnvVar(std::string env_var_name, std::string env_var_value) {
setenv(env_var_name.c_str(), env_var_value.c_str(), 1);
}
+6
Voir le fichier
@@ -152,6 +152,12 @@ bool WaitForThread(Thread thread);
/// @return: bool.
bool WaitForAllThreads(Thread* threads, uint thread_count);
/// @brief: Determines if environment key is set.
/// @param: env_var_name(Input), name of the environment value.
/// @return: bool, true for binding any value to environment key,
/// including an empty string. False otherwise
bool IsEnvVarSet(std::string env_var_name);
/// @brief: Sets the environment value.
/// @param: env_var_name(Input), name of the environment value.
/// @param: env_var_value(Input), value of the environment value.s