From 591d4d1b5ff6d147ac293a3527dc252b868dd5b8 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Mon, 12 Nov 2018 00:32:35 +0000 Subject: [PATCH] Handle (odd) corner case of argumentless __global__ function. [ROCm/hip commit: c0bd1a5af8636d0c5d3fa52fcd20d8676c25ff39] --- projects/hip/include/hip/hcc_detail/functional_grid_launch.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/projects/hip/include/hip/hcc_detail/functional_grid_launch.hpp b/projects/hip/include/hip/hcc_detail/functional_grid_launch.hpp index ba9929c0a6..5edddad6c5 100644 --- a/projects/hip/include/hip/hcc_detail/functional_grid_launch.hpp +++ b/projects/hip/include/hip/hcc_detail/functional_grid_launch.hpp @@ -102,6 +102,8 @@ inline std::vector make_kernarg( static_assert(sizeof...(Formals) == sizeof...(Actuals), "The count of formal arguments must match the count of actuals."); + if (sizeof...(Formals) == 0) return {}; + const auto it = function_names().find( reinterpret_cast(kernel));