Skip to content

Commit

Permalink
Fixes #596: launch_config_builder_t comparison against device id
Browse files Browse the repository at this point in the history
  • Loading branch information
eyalroz committed Apr 19, 2024
1 parent b566948 commit 130cd01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cuda/api/launch_config_builder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ class launch_config_builder_t {

launch_config_builder_t& kernel(const kernel_t* wrapped_kernel_ptr)
{
if (device_ and kernel_->device_id() != device_) {
if (device_ and kernel_->device_id() != device_.value()) {
throw ::std::invalid_argument("Launch config builder already associated with "
+ device::detail_::identify(*device_) + " and cannot further be associated "
"with " +kernel::detail_::identify(*wrapped_kernel_ptr));
Expand All @@ -511,7 +511,7 @@ class launch_config_builder_t {

launch_config_builder_t& device(const device::id_t device_id)
{
if (kernel_ and kernel_->device_id() != device_id) {
if (kernel_ and kernel_->device_id() != device_id) {
throw ::std::invalid_argument("Launch config builder already associated with "
+ kernel::detail_::identify(*kernel_) + " and cannot further be associated "
"another device: " + device::detail_::identify(device_id));
Expand Down

0 comments on commit 130cd01

Please sign in to comment.