From 2a1f1d7dffdbb6acf6d605004bf84a326d81857b Mon Sep 17 00:00:00 2001 From: Lakshmi Kumar Date: Fri, 12 Jan 2024 11:04:47 -0800 Subject: [PATCH] fixes bug when setting env variable (#170) --- samples/videoDecodeFork/videodecodefork.cpp | 2 +- samples/videoDecodePerf/videodecodeperf.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/videoDecodeFork/videodecodefork.cpp b/samples/videoDecodeFork/videodecodefork.cpp index be1534d0aa..8349d7b125 100644 --- a/samples/videoDecodeFork/videodecodefork.cpp +++ b/samples/videoDecodeFork/videodecodefork.cpp @@ -160,7 +160,7 @@ int main(int argc, char **argv) { std::string gcn_arch_name_base = (pos != std::string::npos) ? gcn_arch_name.substr(0, pos) : gcn_arch_name; // gfx90a has two GCDs as two separate devices - if (!gcn_arch_name_base.compare("gfx90a")) { + if (!gcn_arch_name_base.compare("gfx90a") && num_devices > 1) { sd = 1; } diff --git a/samples/videoDecodePerf/videodecodeperf.cpp b/samples/videoDecodePerf/videodecodeperf.cpp index dd3d723939..d67caf2f2b 100644 --- a/samples/videoDecodePerf/videodecodeperf.cpp +++ b/samples/videoDecodePerf/videodecodeperf.cpp @@ -163,7 +163,7 @@ int main(int argc, char **argv) { std::string gcn_arch_name_base = (pos != std::string::npos) ? gcn_arch_name.substr(0, pos) : gcn_arch_name; // gfx90a has two GCDs as two separate devices - if (!gcn_arch_name_base.compare("gfx90a")) { + if (!gcn_arch_name_base.compare("gfx90a") && num_devices > 1) { sd = 1; }