diff --git a/cudax/cmake/cudaxHeaderTesting.cmake b/cudax/cmake/cudaxHeaderTesting.cmake index 4887688f529..6411931b705 100644 --- a/cudax/cmake/cudaxHeaderTesting.cmake +++ b/cudax/cmake/cudaxHeaderTesting.cmake @@ -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 diff --git a/cudax/include/cuda/experimental/__stf/graph/graph_ctx.cuh b/cudax/include/cuda/experimental/__stf/graph/graph_ctx.cuh index 159d4e6e0d0..14ec758c857 100644 --- a/cudax/include/cuda/experimental/__stf/graph/graph_ctx.cuh +++ b/cudax/include/cuda/experimental/__stf/graph/graph_ctx.cuh @@ -118,7 +118,7 @@ private: { static const int ndevices = cuda_try(); // We need to declare who may access this buffer - cudaMemAccessDesc desc[ndevices]; + ::std::vector desc(ndevices); for (int peer : each(0, ndevices)) { desc[peer].location.type = cudaMemLocationTypeDevice; @@ -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); diff --git a/cudax/include/cuda/experimental/__stf/utility/traits.cuh b/cudax/include/cuda/experimental/__stf/utility/traits.cuh index e1046116465..2d987a10000 100644 --- a/cudax/include/cuda/experimental/__stf/utility/traits.cuh +++ b/cudax/include/cuda/experimental/__stf/utility/traits.cuh @@ -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 -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 || ...)) {