From b996310710559d2d0ebcfd714bd84fac1a9dcd8e Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Wed, 29 Nov 2017 01:37:52 +0000 Subject: [PATCH] Fix oversight in selection mechanism which led to erroneous code to be compiled for the grid_launch_GGL component. [ROCm/hip commit: faa546d19430e993d3ad1c3fac1545f0ef379d68] --- projects/hip/include/hip/hcc_detail/grid_launch_GGL.hpp | 2 +- projects/hip/src/functional_grid_launch.inl | 1 - projects/hip/src/grid_launch.cpp | 4 +++- projects/hip/src/macro_based_grid_launch.inl | 2 -- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/projects/hip/include/hip/hcc_detail/grid_launch_GGL.hpp b/projects/hip/include/hip/hcc_detail/grid_launch_GGL.hpp index 187d84dbff..10dae540a4 100644 --- a/projects/hip/include/hip/hcc_detail/grid_launch_GGL.hpp +++ b/projects/hip/include/hip/hcc_detail/grid_launch_GGL.hpp @@ -22,7 +22,7 @@ THE SOFTWARE. #if GENERIC_GRID_LAUNCH == 1 #if __hcc_workweek__ >= 17481 - #define FUNCTIONAL_GRID_LAUNCH + #define FUNCTIONAL_GRID_LAUNCH 1 #include "functional_grid_launch.hpp" #else #include "macro_based_grid_launch.hpp" diff --git a/projects/hip/src/functional_grid_launch.inl b/projects/hip/src/functional_grid_launch.inl index 4a26f66c8c..b555967ebc 100644 --- a/projects/hip/src/functional_grid_launch.inl +++ b/projects/hip/src/functional_grid_launch.inl @@ -20,7 +20,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "hip/hcc_detail/grid_launch_GGL.hpp" #include "hip/hcc_detail/program_state.hpp" #include "hip/hip_runtime_api.h" diff --git a/projects/hip/src/grid_launch.cpp b/projects/hip/src/grid_launch.cpp index 484d314fba..d63fd2d49a 100644 --- a/projects/hip/src/grid_launch.cpp +++ b/projects/hip/src/grid_launch.cpp @@ -20,7 +20,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#if defined(FUNCTIONAL_GRID_LAUNCH) +#include "hip/hcc_detail/grid_launch_GGL.hpp" + +#if !defined(FUNCTIONAL_GRID_LAUNCH) #include "functional_grid_launch.inl" #else #include "macro_based_grid_launch.inl" diff --git a/projects/hip/src/macro_based_grid_launch.inl b/projects/hip/src/macro_based_grid_launch.inl index ad5340c097..5547d3a71a 100644 --- a/projects/hip/src/macro_based_grid_launch.inl +++ b/projects/hip/src/macro_based_grid_launch.inl @@ -20,8 +20,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -#include "hip/hcc_detail/grid_launch_GGL.hpp" - // Internal header, do not percolate upwards. #include "hip_hcc_internal.h" #include "hc.hpp"