From bdd1a2be8f8eb3ee25673fab779a4898a0792b8f Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Thu, 23 Sep 2021 20:20:46 +0000 Subject: [PATCH] Move gmm callbacks to shared Signed-off-by: Mateusz Jablonski --- opencl/source/enable_gens.cmake | 23 ++++--------------- opencl/source/helpers/CMakeLists.txt | 1 - shared/source/enable_gens.cmake | 1 + .../gen11/windows/gmm_callbacks_gen11.cpp | 0 .../gen12lp/windows/gmm_callbacks_gen12lp.cpp | 3 +-- .../gen8/windows/gmm_callbacks_gen8.cpp | 0 .../gen9/windows/gmm_callbacks_gen9.cpp | 0 shared/source/helpers/CMakeLists.txt | 1 + .../windows/gmm_callbacks_tgllp_and_later.inl | 0 .../windows/gmm_callbacks_xe_hp_core.cpp | 3 +-- 10 files changed, 8 insertions(+), 24 deletions(-) rename {opencl => shared}/source/gen11/windows/gmm_callbacks_gen11.cpp (100%) rename {opencl => shared}/source/gen12lp/windows/gmm_callbacks_gen12lp.cpp (80%) rename {opencl => shared}/source/gen8/windows/gmm_callbacks_gen8.cpp (100%) rename {opencl => shared}/source/gen9/windows/gmm_callbacks_gen9.cpp (100%) rename {opencl => shared}/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl (100%) rename {opencl => shared}/source/xe_hp_core/windows/gmm_callbacks_xe_hp_core.cpp (80%) diff --git a/opencl/source/enable_gens.cmake b/opencl/source/enable_gens.cmake index 86d0d6456c..ef4f94df3b 100644 --- a/opencl/source/enable_gens.cmake +++ b/opencl/source/enable_gens.cmake @@ -4,19 +4,6 @@ # SPDX-License-Identifier: MIT # -set(RUNTIME_SRCS_GENX_CPP_WINDOWS - windows/gmm_callbacks -) - -set(RUNTIME_SRCS_GENX_CPP_LINUX -) - -if(NOT DISABLE_WDDM_LINUX) - list(APPEND RUNTIME_SRCS_GENX_CPP_LINUX - ${RUNTIME_SRCS_GENX_CPP_WINDOWS} - ) -endif() - set(RUNTIME_SRCS_GENX_CPP_BASE aub_mem_dump buffer @@ -59,12 +46,10 @@ macro(macro_for_each_gen) endif() endif() - foreach(OS_IT "BASE" "WINDOWS" "LINUX") - foreach(SRC_IT ${RUNTIME_SRCS_GENX_CPP_${OS_IT}}) - if(EXISTS ${GENX_PREFIX}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp) - list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_${OS_IT} ${GENX_PREFIX}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp) - endif() - endforeach() + foreach(SRC_IT ${RUNTIME_SRCS_GENX_CPP_BASE}) + if(EXISTS ${GENX_PREFIX}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp) + list(APPEND RUNTIME_SRCS_${GEN_TYPE}_CPP_BASE ${GENX_PREFIX}/${SRC_IT}_${GEN_TYPE_LOWER}.cpp) + endif() endforeach() foreach(BRANCH ${BRANCH_DIR_LIST}) diff --git a/opencl/source/helpers/CMakeLists.txt b/opencl/source/helpers/CMakeLists.txt index 02439cb2c8..7779ddb9eb 100644 --- a/opencl/source/helpers/CMakeLists.txt +++ b/opencl/source/helpers/CMakeLists.txt @@ -62,7 +62,6 @@ if(SUPPORT_XEHP_AND_LATER) endif() set(RUNTIME_SRCS_HELPERS_WINDOWS - ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks_tgllp_and_later.inl ${CMAKE_CURRENT_SOURCE_DIR}/windows/kmd_notify_properties_windows.cpp ${CMAKE_CURRENT_SOURCE_DIR}/windows/gl_helper.h ) diff --git a/shared/source/enable_gens.cmake b/shared/source/enable_gens.cmake index 6352bd03c6..90bde8ac3e 100644 --- a/shared/source/enable_gens.cmake +++ b/shared/source/enable_gens.cmake @@ -29,6 +29,7 @@ set(CORE_RUNTIME_SRCS_GENX_CPP_BASE set(CORE_RUNTIME_SRCS_GENX_CPP_WINDOWS windows/command_stream_receiver windows/direct_submission + windows/gmm_callbacks ) set(CORE_RUNTIME_SRCS_GENX_CPP_LINUX diff --git a/opencl/source/gen11/windows/gmm_callbacks_gen11.cpp b/shared/source/gen11/windows/gmm_callbacks_gen11.cpp similarity index 100% rename from opencl/source/gen11/windows/gmm_callbacks_gen11.cpp rename to shared/source/gen11/windows/gmm_callbacks_gen11.cpp diff --git a/opencl/source/gen12lp/windows/gmm_callbacks_gen12lp.cpp b/shared/source/gen12lp/windows/gmm_callbacks_gen12lp.cpp similarity index 80% rename from opencl/source/gen12lp/windows/gmm_callbacks_gen12lp.cpp rename to shared/source/gen12lp/windows/gmm_callbacks_gen12lp.cpp index 016d89dda7..0e79b414fd 100644 --- a/opencl/source/gen12lp/windows/gmm_callbacks_gen12lp.cpp +++ b/shared/source/gen12lp/windows/gmm_callbacks_gen12lp.cpp @@ -6,8 +6,7 @@ */ #include "shared/source/gen12lp/hw_cmds.h" - -#include "opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl" +#include "shared/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl" namespace NEO { template struct DeviceCallbacks; diff --git a/opencl/source/gen8/windows/gmm_callbacks_gen8.cpp b/shared/source/gen8/windows/gmm_callbacks_gen8.cpp similarity index 100% rename from opencl/source/gen8/windows/gmm_callbacks_gen8.cpp rename to shared/source/gen8/windows/gmm_callbacks_gen8.cpp diff --git a/opencl/source/gen9/windows/gmm_callbacks_gen9.cpp b/shared/source/gen9/windows/gmm_callbacks_gen9.cpp similarity index 100% rename from opencl/source/gen9/windows/gmm_callbacks_gen9.cpp rename to shared/source/gen9/windows/gmm_callbacks_gen9.cpp diff --git a/shared/source/helpers/CMakeLists.txt b/shared/source/helpers/CMakeLists.txt index 6975fd0b7c..0cb6ec3f5c 100644 --- a/shared/source/helpers/CMakeLists.txt +++ b/shared/source/helpers/CMakeLists.txt @@ -145,6 +145,7 @@ set(NEO_CORE_HELPERS_GMM_CALLBACKS_WINDOWS ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.cpp ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.h ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks.inl + ${CMAKE_CURRENT_SOURCE_DIR}/windows/gmm_callbacks_tgllp_and_later.inl ) set_property(GLOBAL PROPERTY NEO_CORE_HELPERS_GMM_CALLBACKS_WINDOWS ${NEO_CORE_HELPERS_GMM_CALLBACKS_WINDOWS}) diff --git a/opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl b/shared/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl similarity index 100% rename from opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl rename to shared/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl diff --git a/opencl/source/xe_hp_core/windows/gmm_callbacks_xe_hp_core.cpp b/shared/source/xe_hp_core/windows/gmm_callbacks_xe_hp_core.cpp similarity index 80% rename from opencl/source/xe_hp_core/windows/gmm_callbacks_xe_hp_core.cpp rename to shared/source/xe_hp_core/windows/gmm_callbacks_xe_hp_core.cpp index 4e19d4c280..12023d7f2b 100644 --- a/opencl/source/xe_hp_core/windows/gmm_callbacks_xe_hp_core.cpp +++ b/shared/source/xe_hp_core/windows/gmm_callbacks_xe_hp_core.cpp @@ -5,10 +5,9 @@ * */ +#include "shared/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl" #include "shared/source/xe_hp_core/hw_cmds.h" -#include "opencl/source/helpers/windows/gmm_callbacks_tgllp_and_later.inl" - namespace NEO { template struct DeviceCallbacks; template struct TTCallbacks;