Skip to content

Commit

Permalink
Fixes #330: Ensuring either a kernel or a device have been associated…
Browse files Browse the repository at this point in the history
… when trying to `use_maximum_linear_block()` in a launch config builder.
  • Loading branch information
eyalroz committed May 25, 2022
1 parent 8050716 commit a778322
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/cuda/api/launch_config_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,6 +425,9 @@ class launch_config_builder_t {
else if (device_) {
max_size = device().maximum_threads_per_block();
}
else {
throw std::logic_error("Request to use the maximum-size linear block, with no device or kernel specified");
}
auto block_dims = grid::block_dimensions_t { max_size, 1, 1 };

if (dimensions_.grid and dimensions_.overall) {
Expand Down

0 comments on commit a778322

Please sign in to comment.