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

Fix two trivial build errors #8467

Merged
merged 3 commits into from
Nov 7, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions test/common/halide_test_dirs.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// include Halide.h

#include <cassert>
#include <stdlib.h>
#include <string>

#ifdef _WIN32
Expand Down
3 changes: 2 additions & 1 deletion test/performance/parallel_scenarios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ int main(int argc, char **argv) {

auto bench_one = [&]() {
auto t1 = std::chrono::high_resolution_clock::now();
callable(i, o, memory_limit, in, out);
// Ignore error code because default halide_error() will abort on failure
(void)callable(i, o, memory_limit, in, out);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually returns an error code doesn't it? Might be worth checking it outside the timing scope.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't overloaded halide_error in this test, so it actually just always returns zero (or aborts before returning)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added comment

auto t2 = std::chrono::high_resolution_clock::now();
return 1e9 * std::chrono::duration<float>(t2 - t1).count() / (i * o);
};
Expand Down
Loading