Decompose hw helper for GTPin functionality

Signed-off-by: Milczarek, Slawomir <slawomir.milczarek@intel.com>
This commit is contained in:
Milczarek, Slawomir
2021-04-07 13:28:28 +00:00
committed by Compute-Runtime-Automation
parent 223a42c3c7
commit da7eaff0fe
8 changed files with 38 additions and 17 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2020 Intel Corporation * Copyright (C) 2018-2021 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@ -7,6 +7,7 @@
#include "opencl/source/gtpin/gtpin_hw_helper.h" #include "opencl/source/gtpin/gtpin_hw_helper.h"
#include "opencl/source/gtpin/gtpin_hw_helper.inl" #include "opencl/source/gtpin/gtpin_hw_helper.inl"
#include "opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl"
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h" #include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2019-2020 Intel Corporation * Copyright (C) 2019-2021 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@ -7,6 +7,7 @@
#include "opencl/source/gtpin/gtpin_hw_helper.h" #include "opencl/source/gtpin/gtpin_hw_helper.h"
#include "opencl/source/gtpin/gtpin_hw_helper.inl" #include "opencl/source/gtpin/gtpin_hw_helper.inl"
#include "opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl"
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h" #include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2020 Intel Corporation * Copyright (C) 2018-2021 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@ -7,6 +7,7 @@
#include "opencl/source/gtpin/gtpin_hw_helper.h" #include "opencl/source/gtpin/gtpin_hw_helper.h"
#include "opencl/source/gtpin/gtpin_hw_helper.inl" #include "opencl/source/gtpin/gtpin_hw_helper.inl"
#include "opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl"
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h" #include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (C) 2018-2020 Intel Corporation * Copyright (C) 2018-2021 Intel Corporation
* *
* SPDX-License-Identifier: MIT * SPDX-License-Identifier: MIT
* *
@ -7,6 +7,7 @@
#include "opencl/source/gtpin/gtpin_hw_helper.h" #include "opencl/source/gtpin/gtpin_hw_helper.h"
#include "opencl/source/gtpin/gtpin_hw_helper.inl" #include "opencl/source/gtpin/gtpin_hw_helper.inl"
#include "opencl/source/gtpin/gtpin_hw_helper_bdw_plus.inl"
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h" #include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2018-2020 Intel Corporation # Copyright (C) 2018-2021 Intel Corporation
# #
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# #
@ -13,6 +13,7 @@ if(NOT DISABLED_GTPIN_SUPPORT)
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper.h ${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper.inl ${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper.inl
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_hw_helper_bdw_plus.inl
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_init.cpp ${CMAKE_CURRENT_SOURCE_DIR}/gtpin_init.cpp
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_init.h ${CMAKE_CURRENT_SOURCE_DIR}/gtpin_init.h
${CMAKE_CURRENT_SOURCE_DIR}/gtpin_notify.h ${CMAKE_CURRENT_SOURCE_DIR}/gtpin_notify.h
@ -34,3 +35,5 @@ endif()
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_GTPIN}) target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_GTPIN})
set_property(GLOBAL PROPERTY RUNTIME_SRCS_GTPIN ${RUNTIME_SRCS_GTPIN}) set_property(GLOBAL PROPERTY RUNTIME_SRCS_GTPIN ${RUNTIME_SRCS_GTPIN})
set(MSVC_DEF_ADDITIONAL_EXPORTS "${MSVC_DEF_ADDITIONAL_EXPORTS}" PARENT_SCOPE) set(MSVC_DEF_ADDITIONAL_EXPORTS "${MSVC_DEF_ADDITIONAL_EXPORTS}" PARENT_SCOPE)
add_subdirectories()

View File

@ -55,15 +55,4 @@ void *GTPinHwHelperHw<GfxFamily>::getSurfaceState(Kernel *pKernel, size_t bti) {
auto pSurfaceState = ptrOffset(pKernel->getSurfaceStateHeap(), pBts->getSurfaceStatePointer()); auto pSurfaceState = ptrOffset(pKernel->getSurfaceStateHeap(), pBts->getSurfaceStatePointer());
return pSurfaceState; return pSurfaceState;
} }
template <typename GfxFamily>
bool GTPinHwHelperHw<GfxFamily>::canUseSharedAllocation(const HardwareInfo &hwInfo) const {
bool canUseSharedAllocation = false;
if (DebugManager.flags.GTPinAllocateBufferInSharedMemory.get() != -1) {
canUseSharedAllocation = !!DebugManager.flags.GTPinAllocateBufferInSharedMemory.get();
}
canUseSharedAllocation &= hwInfo.capabilityTable.ftrSvm;
return canUseSharedAllocation;
}
} // namespace NEO } // namespace NEO

View File

@ -0,0 +1,24 @@
/*
* Copyright (C) 2018-2021 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "opencl/source/gtpin/gtpin_hw_helper.h"
namespace NEO {
template <typename GfxFamily>
bool GTPinHwHelperHw<GfxFamily>::canUseSharedAllocation(const HardwareInfo &hwInfo) const {
bool canUseSharedAllocation = false;
if (DebugManager.flags.GTPinAllocateBufferInSharedMemory.get() != -1) {
canUseSharedAllocation = !!DebugManager.flags.GTPinAllocateBufferInSharedMemory.get();
}
canUseSharedAllocation &= hwInfo.capabilityTable.ftrSvm;
return canUseSharedAllocation;
}
} // namespace NEO

View File

@ -1,5 +1,5 @@
# #
# Copyright (C) 2017-2020 Intel Corporation # Copyright (C) 2017-2021 Intel Corporation
# #
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
# #
@ -19,3 +19,4 @@ apply_macro_for_each_gen("TESTED")
if(NOT DISABLED_GTPIN_SUPPORT) if(NOT DISABLED_GTPIN_SUPPORT)
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gtpin}) target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gtpin})
endif() endif()
add_subdirectories()