Skip to content

Commit 9ebd669

Browse files
committed
[UR] Fix UR_ENABLE_LAYERS parsing
During context creation UR_ENABLE_LAYERS was being incorrectly parsed expecting key-value pairs, but its supposed to accept a comma separated list of arguments.
1 parent 74c9580 commit 9ebd669

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

unified-runtime/source/loader/ur_lib.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ context_t::context_t() { parseEnvEnabledLayers(); }
3838
context_t::~context_t() {}
3939

4040
void context_t::parseEnvEnabledLayers() {
41-
auto maybeEnableEnvVarMap = getenv_to_map("UR_ENABLE_LAYERS", false);
42-
if (!maybeEnableEnvVarMap.has_value()) {
41+
auto maybeEnableEnvVarVec = getenv_to_vec("UR_ENABLE_LAYERS");
42+
if (!maybeEnableEnvVarVec.has_value()) {
4343
return;
4444
}
45-
auto enableEnvVarMap = maybeEnableEnvVarMap.value();
45+
auto enableEnvVarVec = maybeEnableEnvVarVec.value();
4646

47-
for (auto &key : enableEnvVarMap) {
48-
enabledLayerNames.insert(key.first);
47+
for (auto &layer : enableEnvVarVec) {
48+
enabledLayerNames.insert(layer);
4949
}
5050
}
5151

0 commit comments

Comments
 (0)