Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow disabling of mutlithreading in simd op check #8096

Merged
merged 1 commit into from
Feb 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/correctness/simd_op_check.h
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,10 @@ class SimdOpCheckTest {
return 16;
}

virtual bool use_multiple_threads() const {
return true;
}

virtual bool test_all() {
/* First add some tests based on the target */
add_tests();
Expand All @@ -460,7 +464,10 @@ class SimdOpCheckTest {

Sharder sharder;

Halide::Tools::ThreadPool<TestResult> pool;
Halide::Tools::ThreadPool<TestResult> pool(
use_multiple_threads() ?
Halide::Tools::ThreadPool<TestResult>::num_processors_online() :
1);
std::vector<std::future<TestResult>> futures;

for (size_t t = 0; t < tasks.size(); t++) {
Expand Down
Loading