Skip to content

Commit

Permalink
Fixes #598: library kernel get_attribute() now actually returns the…
Browse files Browse the repository at this point in the history
… attribute, and `set_attribute()` returns `void`
  • Loading branch information
eyalroz committed Apr 29, 2024
1 parent 9f9cc5f commit df2c5be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
6 changes: 0 additions & 6 deletions src/cuda/api/kernel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,12 +394,6 @@ inline void set_attribute(const kernel_t& kernel, attribute_t attribute, attribu
return detail_::set_attribute_in_current_context(kernel.handle(), attribute, value);
}

inline attribute_value_t set_attribute(const kernel_t& kernel, attribute_t attribute)
{
CAW_SET_SCOPE_CONTEXT(kernel.context_handle());
return kernel::detail_::get_attribute_in_current_context(kernel.handle(), attribute);
}

namespace occupancy {

namespace detail_ {
Expand Down
3 changes: 2 additions & 1 deletion src/cuda/api/kernels/in_library.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,10 @@ inline attribute_value_t get_attribute(
throw_if_error_lazy(status, ::std::string("Failed getting attribute ")
+ cuda::kernel::detail_::attribute_name(attribute) + " for " + identify(library_kernel_handle)
+ " on " + device::detail_::identify(device_id));
return value;
}

inline attribute_value_t set_attribute(
inline void set_attribute(
kernel::handle_t library_kernel_handle,
device::id_t device_id,
kernel::attribute_t attribute,
Expand Down

0 comments on commit df2c5be

Please sign in to comment.