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

CUDASTF sanity checks #2

Merged
merged 2 commits into from
Oct 10, 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
4 changes: 0 additions & 4 deletions cudax/cmake/cudaxHeaderTesting.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ function(cudax_add_header_test label definitions)
# FIXME: error: possibly dangling reference to a temporary (stream_task.cuh:114)
cuda/experimental/__stf/stream/stream_task.cuh
cuda/experimental/__stf/stream/stream_ctx.cuh

# FIXME: -Wvla: Avoid VLAs (cudaMemAccessDesc desc[ndevices];), they're non-portable:
cuda/experimental/__stf/graph/graph_ctx.cuh
cuda/experimental/stf.cuh
)
target_link_libraries(${headertest_target} PUBLIC ${cn_target})
target_compile_definitions(${headertest_target} PRIVATE
Expand Down
4 changes: 2 additions & 2 deletions cudax/include/cuda/experimental/__stf/graph/graph_ctx.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ private:
{
static const int ndevices = cuda_try<cudaGetDeviceCount>();
// We need to declare who may access this buffer
cudaMemAccessDesc desc[ndevices];
::std::vector<cudaMemAccessDesc> desc(ndevices);
for (int peer : each(0, ndevices))
{
desc[peer].location.type = cudaMemLocationTypeDevice;
Expand All @@ -143,7 +143,7 @@ private:

// Set only the variable parameters
params.poolProps.location.id = device_ordinal(memory_node);
params.accessDescs = desc;
params.accessDescs = desc.data();
params.accessDescCount = size_t(ndevices);
params.bytesize = size_t(s);

Expand Down
2 changes: 1 addition & 1 deletion cudax/include/cuda/experimental/__stf/utility/traits.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ auto all_convertible(P&&... p)
* @return T Either the first convertible parameter, or `default_v` if no such parameter is found
*/
template <typename T, typename... P>
T only_convertible_or(T default_v, P&&... p)
T only_convertible_or([[maybe_unused]] T default_v, P&&... p)
{
if constexpr (!(::std::is_convertible_v<P, T> || ...))
{
Expand Down
Loading