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 sg benchmark build. #4766

Merged
merged 1 commit into from
Jun 2, 2022
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
4 changes: 2 additions & 2 deletions cpp/bench/sg/benchmark.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Fixture : public MLCommon::Bench::Fixture {

void SetUp(const ::benchmark::State& state) override
{
auto stream_pool = std::make_shared<rmm::cuda_stream_pool>(NumStreams);
auto stream_pool = std::make_shared<rmm::cuda_stream_pool>(numStreams());
handle.reset(new raft::handle_t{rmm::cuda_stream_per_thread, stream_pool});
MLCommon::Bench::Fixture::SetUp(state);
}
Expand Down Expand Up @@ -88,7 +88,7 @@ class Fixture : public MLCommon::Bench::Fixture {
///@todo: ideally, this should be determined at runtime based on the inputs
/// passed to the fixture. That will require a whole lot of plumbing of
/// interfaces. Thus, as a quick workaround, defining this static var.
static const int NumStreams = 16;
constexpr static std::int32_t numStreams() { return 16; }
}; // end class Fixture

/**
Expand Down