Skip to content

Commit

Permalink
[dtests] Fix random timeout failures in hipModuleLoadDataMultThreaded (
Browse files Browse the repository at this point in the history
…ROCm#1877)

Limit the max threads that are launched to 16.
  • Loading branch information
mangupta authored Feb 17, 2020
1 parent 56b8b0d commit 854afef
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ THE SOFTWARE.
#define LEN 64
#define SIZE LEN << 2
#define THREADS 2
#define MAX_THREADS 16

#define FILENAME "vcpy_kernel.code"
#define kernel_name "hello_world"
Expand Down Expand Up @@ -145,7 +146,7 @@ int main() {

HIPCHECK(hipInit(0));
auto buffer = load_file();
run_multi_threads(THREADS * std::thread::hardware_concurrency(), buffer);
run_multi_threads(min(THREADS * std::thread::hardware_concurrency(), MAX_THREADS), buffer);

passed();
}

0 comments on commit 854afef

Please sign in to comment.