"...python_stable_diffusion_21/gradio_reqirements.txt" did not exist on "e44cecbc67d53dd62ef575eebd81d61dc866b8b3"
Commit 6befe934 authored by Brian Pickrell's avatar Brian Pickrell
Browse files

joinable threads in test

parent d0db0cd2
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
*/ */
#include <migraphx/register_target.hpp> #include <migraphx/register_target.hpp>
#include <migraphx/target.hpp> #include <migraphx/target.hpp>
#include <thread> #include <migraphx/par_for.hpp>
#include "test.hpp" #include "test.hpp"
TEST_CASE(make_target) TEST_CASE(make_target)
...@@ -53,7 +53,7 @@ TEST_CASE(targets) ...@@ -53,7 +53,7 @@ TEST_CASE(targets)
TEST_CASE(concurrent_targets) TEST_CASE(concurrent_targets)
{ {
std::vector<std::thread> threads; std::vector<migraphx::joinable_thread> threads;
#ifdef HAVE_GPU #ifdef HAVE_GPU
std::string target_name = "gpu"; std::string target_name = "gpu";
#elif defined(HAVE_CPU) #elif defined(HAVE_CPU)
...@@ -86,8 +86,7 @@ TEST_CASE(concurrent_targets) ...@@ -86,8 +86,7 @@ TEST_CASE(concurrent_targets)
threads.emplace_back(thread_body); threads.emplace_back(thread_body);
} }
for(auto& tt : threads) // joinable_thread don't need to have join() called.
tt.join();
} }
int main(int argc, const char* argv[]) { test::run(argc, argv); } int main(int argc, const char* argv[]) { test::run(argc, argv); }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment