Skip to content

Commit

Permalink
Merge pull request #2 from caugonnet/cudastf
Browse files Browse the repository at this point in the history
CUDASTF sanity checks
  • Loading branch information
alliepiper authored Oct 10, 2024
2 parents 5c55fef + 705502c commit 5aed944
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
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

0 comments on commit 5aed944

Please sign in to comment.