mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-18 13:54:58 +08:00
refactor: remove legacy code
Related-To: NEO-6683 Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f745eb44fb
commit
73382b9b6c
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_GEN11)
|
||||
target_sources(${L0_STATIC_LIB_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen11.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/l0_gfx_core_helper_gen11.cpp
|
||||
)
|
||||
add_subdirectories()
|
||||
|
||||
endif()
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_base.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/pipe_control_args.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.inl"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl"
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
|
||||
#include "cmdlist_extended.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
void CommandListCoreFamily<IGFX_GEN11_CORE>::applyMemoryRangesBarrier(uint32_t numRanges,
|
||||
const size_t *pRangeSizes,
|
||||
const void **pRanges) {
|
||||
NEO::PipeControlArgs args;
|
||||
args.dcFlushEnable = this->dcFlushSupport;
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addSingleBarrier(*commandContainer.getCommandStream(), args);
|
||||
}
|
||||
|
||||
template struct CommandListCoreFamily<IGFX_GEN11_CORE>;
|
||||
template struct CommandListCoreFamilyImmediate<IGFX_GEN11_CORE>;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/gen11/hw_cmds_base.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"
|
||||
|
||||
namespace L0 {
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
struct CommandListProductFamily : public CommandListCoreFamily<IGFX_GEN11_CORE> {
|
||||
using CommandListCoreFamily::CommandListCoreFamily;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY gfxProductFamily>
|
||||
struct CommandListImmediateProductFamily : public CommandListCoreFamilyImmediate<IGFX_GEN11_CORE> {
|
||||
using CommandListCoreFamilyImmediate::CommandListCoreFamilyImmediate;
|
||||
};
|
||||
} // namespace L0
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h"
|
||||
#include "level_zero/core/source/helpers/l0_populate_factory.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen11Family;
|
||||
|
||||
struct EnableL0Gen11 {
|
||||
EnableL0Gen11() {
|
||||
L0::populateFactoryTable<L0::L0GfxCoreHelperHw<Family>>();
|
||||
}
|
||||
};
|
||||
|
||||
static EnableL0Gen11 enable;
|
||||
} // namespace NEO
|
||||
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_ICLLP)
|
||||
target_sources(${L0_STATIC_LIB_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_icllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdqueue_icllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_icllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_icllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_icllp.cpp
|
||||
)
|
||||
endif()
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_base.h"
|
||||
|
||||
#include "level_zero/core/source/gen11/cmdlist_gen11.h"
|
||||
|
||||
namespace L0 {
|
||||
static CommandListPopulateFactory<IGFX_ICELAKE_LP, CommandListProductFamily<IGFX_ICELAKE_LP>>
|
||||
populateICLLP;
|
||||
|
||||
static CommandListImmediatePopulateFactory<IGFX_ICELAKE_LP, CommandListImmediateProductFamily<IGFX_ICELAKE_LP>>
|
||||
populateICLLPImmediate;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_icllp.h"
|
||||
#include "shared/source/gen11/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl"
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw_skl_to_tgllp.inl"
|
||||
|
||||
#include "igfxfmid.h"
|
||||
|
||||
namespace L0 {
|
||||
template struct CommandQueueHw<IGFX_GEN11_CORE>;
|
||||
static CommandQueuePopulateFactory<IGFX_ICELAKE_LP, CommandQueueHw<IGFX_GEN11_CORE>> populateICLLP;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,26 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_icllp.h"
|
||||
#include "shared/source/gen11/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/image/image_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
struct ImageProductFamily<IGFX_ICELAKE_LP> : public ImageCoreFamily<IGFX_GEN11_CORE> {
|
||||
using ImageCoreFamily::ImageCoreFamily;
|
||||
|
||||
ze_result_t initialize(Device *device, const ze_image_desc_t *desc) override {
|
||||
return ImageCoreFamily<IGFX_GEN11_CORE>::initialize(device, desc);
|
||||
};
|
||||
};
|
||||
|
||||
static ImagePopulateFactory<IGFX_ICELAKE_LP, ImageProductFamily<IGFX_ICELAKE_LP>> populateICLLP;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_base.h"
|
||||
|
||||
#include "level_zero/core/source/kernel/kernel_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
static KernelPopulateFactory<IGFX_ICELAKE_LP, KernelHw<IGFX_GEN11_CORE>> populateICLLP;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_icllp.h"
|
||||
#include "shared/source/gen11/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/sampler/sampler_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
struct SamplerProductFamily<IGFX_ICELAKE_LP> : public SamplerCoreFamily<IGFX_GEN11_CORE> {
|
||||
using SamplerCoreFamily::SamplerCoreFamily;
|
||||
};
|
||||
|
||||
static SamplerPopulateFactory<IGFX_ICELAKE_LP, SamplerProductFamily<IGFX_ICELAKE_LP>> populateICLLP;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_base.inl"
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_icllp.inl"
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_pvc.inl"
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_tgllp.inl"
|
||||
#include "level_zero/core/source/helpers/l0_populate_factory.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
using Family = NEO::Gen11Family;
|
||||
static auto gfxCore = IGFX_GEN11_CORE;
|
||||
|
||||
#include "level_zero/core/source/helpers/l0_gfx_core_helper_factory_init.inl"
|
||||
|
||||
template class L0GfxCoreHelperHw<Family>;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,12 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_GEN8)
|
||||
target_sources(${L0_STATIC_LIB_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen8.cpp
|
||||
)
|
||||
endif()
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen8Family;
|
||||
|
||||
struct EnableL0Gen8 {
|
||||
EnableL0Gen8() {
|
||||
}
|
||||
};
|
||||
|
||||
static EnableL0Gen8 enable;
|
||||
} // namespace NEO
|
||||
@@ -1,17 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_GEN9)
|
||||
target_sources(${L0_STATIC_LIB_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_gen9.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_family_full_l0_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/l0_gfx_core_helper_gen9.cpp
|
||||
)
|
||||
|
||||
add_subdirectories()
|
||||
endif()
|
||||
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_CFL)
|
||||
target_sources(${L0_STATIC_LIB_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_cfl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdqueue_cfl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_cfl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_cfl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_cfl.cpp
|
||||
)
|
||||
endif()
|
||||
@@ -1,17 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/core/source/gen9/cmdlist_gen9.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
static CommandListPopulateFactory<IGFX_COFFEELAKE, CommandListProductFamily<IGFX_COFFEELAKE>>
|
||||
populateCFL;
|
||||
|
||||
static CommandListImmediatePopulateFactory<IGFX_COFFEELAKE, CommandListImmediateProductFamily<IGFX_COFFEELAKE>>
|
||||
populateCFLImmediate;
|
||||
} // namespace L0
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_cfl.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl"
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw_skl_to_tgllp.inl"
|
||||
|
||||
#include "igfxfmid.h"
|
||||
|
||||
namespace L0 {
|
||||
template struct CommandQueueHw<IGFX_GEN9_CORE>;
|
||||
static CommandQueuePopulateFactory<IGFX_COFFEELAKE, CommandQueueHw<IGFX_GEN9_CORE>> populateCFL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_cfl.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/image/image_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
struct ImageProductFamily<IGFX_COFFEELAKE> : public ImageCoreFamily<IGFX_GEN9_CORE> {
|
||||
using ImageCoreFamily::ImageCoreFamily;
|
||||
};
|
||||
|
||||
static ImagePopulateFactory<IGFX_COFFEELAKE, ImageProductFamily<IGFX_COFFEELAKE>> populateCFL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_base.h"
|
||||
|
||||
#include "level_zero/core/source/kernel/kernel_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
static KernelPopulateFactory<IGFX_COFFEELAKE, KernelHw<IGFX_GEN9_CORE>> populateCFL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_cfl.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/sampler/sampler_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
struct SamplerProductFamily<IGFX_COFFEELAKE> : public SamplerCoreFamily<IGFX_GEN9_CORE> {
|
||||
using SamplerCoreFamily::SamplerCoreFamily;
|
||||
};
|
||||
|
||||
static SamplerPopulateFactory<IGFX_COFFEELAKE, SamplerProductFamily<IGFX_COFFEELAKE>> populateCFL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/command_encoder.h"
|
||||
#include "shared/source/gen9/hw_cmds_base.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/pipe_control_args.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.inl"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.inl"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_skl_to_tgllp.inl"
|
||||
#include "level_zero/core/source/device/device.h"
|
||||
|
||||
#include "cmdlist_extended.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
void CommandListCoreFamily<IGFX_GEN9_CORE>::applyMemoryRangesBarrier(uint32_t numRanges,
|
||||
const size_t *pRangeSizes,
|
||||
const void **pRanges) {
|
||||
NEO::PipeControlArgs args;
|
||||
args.dcFlushEnable = this->dcFlushSupport;
|
||||
NEO::MemorySynchronizationCommands<GfxFamily>::addSingleBarrier(*commandContainer.getCommandStream(), args);
|
||||
}
|
||||
|
||||
template <>
|
||||
void CommandListCoreFamily<IGFX_GEN9_CORE>::programL3(bool isSLMused) {
|
||||
NEO::EncodeL3State<GfxFamily>::encode(commandContainer, isSLMused);
|
||||
}
|
||||
|
||||
template struct CommandListCoreFamily<IGFX_GEN9_CORE>;
|
||||
template struct CommandListCoreFamilyImmediate<IGFX_GEN9_CORE>;
|
||||
} // namespace L0
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw.h"
|
||||
#include "level_zero/core/source/cmdlist/cmdlist_hw_immediate.h"
|
||||
|
||||
#include "igfxfmid.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <PRODUCT_FAMILY gfxProductFamily>
|
||||
struct CommandListProductFamily : public CommandListCoreFamily<IGFX_GEN9_CORE> {
|
||||
using CommandListCoreFamily::CommandListCoreFamily;
|
||||
};
|
||||
|
||||
template <PRODUCT_FAMILY gfxProductFamily>
|
||||
struct CommandListImmediateProductFamily : public CommandListCoreFamilyImmediate<IGFX_GEN9_CORE> {
|
||||
using CommandListCoreFamilyImmediate::CommandListCoreFamilyImmediate;
|
||||
};
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,24 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h"
|
||||
#include "level_zero/core/source/helpers/l0_populate_factory.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen9Family;
|
||||
|
||||
struct EnableL0Gen9 {
|
||||
EnableL0Gen9() {
|
||||
L0::populateFactoryTable<L0::L0GfxCoreHelperHw<Family>>();
|
||||
}
|
||||
};
|
||||
|
||||
static EnableL0Gen9 enable;
|
||||
} // namespace NEO
|
||||
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_KBL)
|
||||
target_sources(${L0_STATIC_LIB_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_kbl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdqueue_kbl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_kbl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_kbl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_kbl.cpp
|
||||
)
|
||||
endif()
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/core/source/gen9/cmdlist_gen9.h"
|
||||
|
||||
namespace L0 {
|
||||
static CommandListPopulateFactory<IGFX_KABYLAKE, CommandListProductFamily<IGFX_KABYLAKE>>
|
||||
populateKBL;
|
||||
|
||||
static CommandListImmediatePopulateFactory<IGFX_KABYLAKE, CommandListImmediateProductFamily<IGFX_KABYLAKE>>
|
||||
populateKBLImmediate;
|
||||
} // namespace L0
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_kbl.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl"
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw_skl_to_tgllp.inl"
|
||||
|
||||
#include "igfxfmid.h"
|
||||
|
||||
namespace L0 {
|
||||
template struct CommandQueueHw<IGFX_GEN9_CORE>;
|
||||
static CommandQueuePopulateFactory<IGFX_KABYLAKE, CommandQueueHw<IGFX_GEN9_CORE>> populateKBL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_kbl.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/image/image_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
struct ImageProductFamily<IGFX_KABYLAKE> : public ImageCoreFamily<IGFX_GEN9_CORE> {
|
||||
using ImageCoreFamily::ImageCoreFamily;
|
||||
};
|
||||
|
||||
static ImagePopulateFactory<IGFX_KABYLAKE, ImageProductFamily<IGFX_KABYLAKE>> populateKBL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_base.h"
|
||||
|
||||
#include "level_zero/core/source/kernel/kernel_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
static KernelPopulateFactory<IGFX_KABYLAKE, KernelHw<IGFX_GEN9_CORE>> populateKBL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_kbl.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/sampler/sampler_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
struct SamplerProductFamily<IGFX_KABYLAKE> : public SamplerCoreFamily<IGFX_GEN9_CORE> {
|
||||
using SamplerCoreFamily::SamplerCoreFamily;
|
||||
};
|
||||
|
||||
static SamplerPopulateFactory<IGFX_KABYLAKE, SamplerProductFamily<IGFX_KABYLAKE>> populateKBL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,25 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_base.inl"
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_icllp.inl"
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_pvc.inl"
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper_skl_to_tgllp.inl"
|
||||
#include "level_zero/core/source/helpers/l0_populate_factory.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
using Family = NEO::Gen9Family;
|
||||
static auto gfxCore = IGFX_GEN9_CORE;
|
||||
|
||||
#include "level_zero/core/source/helpers/l0_gfx_core_helper_factory_init.inl"
|
||||
|
||||
template class L0GfxCoreHelperHw<Family>;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,16 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_SKL)
|
||||
target_sources(${L0_STATIC_LIB_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdlist_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cmdqueue_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/kernel_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/image_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sampler_skl.cpp
|
||||
)
|
||||
endif()
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/core/source/gen9/cmdlist_gen9.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
static CommandListPopulateFactory<IGFX_SKYLAKE, CommandListProductFamily<IGFX_SKYLAKE>>
|
||||
populateSKL;
|
||||
|
||||
static CommandListImmediatePopulateFactory<IGFX_SKYLAKE, CommandListImmediateProductFamily<IGFX_SKYLAKE>>
|
||||
populateSKLImmediate;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_skl.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw.inl"
|
||||
#include "level_zero/core/source/cmdqueue/cmdqueue_hw_skl_to_tgllp.inl"
|
||||
|
||||
#include "igfxfmid.h"
|
||||
|
||||
namespace L0 {
|
||||
template struct CommandQueueHw<IGFX_GEN9_CORE>;
|
||||
static CommandQueuePopulateFactory<IGFX_SKYLAKE, CommandQueueHw<IGFX_GEN9_CORE>> populateSKL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_skl.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/image/image_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
struct ImageProductFamily<IGFX_SKYLAKE> : public ImageCoreFamily<IGFX_GEN9_CORE> {
|
||||
using ImageCoreFamily::ImageCoreFamily;
|
||||
};
|
||||
|
||||
static ImagePopulateFactory<IGFX_SKYLAKE, ImageProductFamily<IGFX_SKYLAKE>> populateSKL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_base.h"
|
||||
|
||||
#include "level_zero/core/source/kernel/kernel_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
static KernelPopulateFactory<IGFX_SKYLAKE, KernelHw<IGFX_GEN9_CORE>> populateSKL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,22 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/hw_cmds_skl.h"
|
||||
#include "shared/source/gen9/hw_info.h"
|
||||
|
||||
#include "level_zero/core/source/sampler/sampler_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
|
||||
template <>
|
||||
struct SamplerProductFamily<IGFX_SKYLAKE> : public SamplerCoreFamily<IGFX_GEN9_CORE> {
|
||||
using SamplerCoreFamily::SamplerCoreFamily;
|
||||
};
|
||||
|
||||
static SamplerPopulateFactory<IGFX_SKYLAKE, SamplerProductFamily<IGFX_SKYLAKE>> populateSKL;
|
||||
|
||||
} // namespace L0
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(TESTS_GEN11)
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cmdqueue_thread_arbitration_policy_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_l0_gfx_core_helper_gen11.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_module_gen11.cpp
|
||||
)
|
||||
endif()
|
||||
@@ -1,112 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/reg_configs.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using CommandQueueThreadArbitrationPolicyTests = Test<CommandQueueThreadArbitrationPolicyFixture>;
|
||||
|
||||
HWTEST2_F(CommandQueueThreadArbitrationPolicyTests,
|
||||
whenCommandListIsExecutedThenDefaultRoundRobinThreadArbitrationPolicyIsUsed,
|
||||
IsGen11HP) {
|
||||
size_t usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
ze_command_list_handle_t hCommandList = commandList->toHandle();
|
||||
auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
size_t usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin),
|
||||
cmd->getDataDword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandQueueThreadArbitrationPolicyTests,
|
||||
whenCommandListIsExecutedAndOverrideThreadArbitrationPolicyDebugFlagIsSetToZeroThenAgeBasedThreadArbitrationPolicyIsUsed,
|
||||
IsGen11HP) {
|
||||
debugManager.flags.OverrideThreadArbitrationPolicy.set(0);
|
||||
|
||||
size_t usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
ze_command_list_handle_t hCommandList = commandList->toHandle();
|
||||
auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
size_t usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::AgeBased),
|
||||
cmd->getDataDword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandQueueThreadArbitrationPolicyTests,
|
||||
whenCommandListIsExecutedAndOverrideThreadArbitrationPolicyDebugFlagIsSetToOneThenRoundRobinThreadArbitrationPolicyIsUsed,
|
||||
IsGen11HP) {
|
||||
debugManager.flags.OverrideThreadArbitrationPolicy.set(1);
|
||||
|
||||
size_t usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
ze_command_list_handle_t hCommandList = commandList->toHandle();
|
||||
auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
size_t usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin),
|
||||
cmd->getDataDword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using L0GfxCoreHelperTestGen11 = Test<DeviceFixture>;
|
||||
|
||||
GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForCmdListHeapSharingSupportThenReturnTrue) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.platformSupportsCmdListHeapSharing());
|
||||
}
|
||||
|
||||
GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForStateComputeModeTrackingSupportThenReturnFalse) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_FALSE(l0GfxCoreHelper.platformSupportsStateComputeModeTracking());
|
||||
}
|
||||
|
||||
GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForFrontEndTrackingSupportThenReturnFalse) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_FALSE(l0GfxCoreHelper.platformSupportsFrontEndTracking());
|
||||
}
|
||||
|
||||
GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForPipelineSelectTrackingSupportThenReturnFalse) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_FALSE(l0GfxCoreHelper.platformSupportsPipelineSelectTracking());
|
||||
}
|
||||
|
||||
GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForStateBaseAddressTrackingSupportThenReturnFalse) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_FALSE(l0GfxCoreHelper.platformSupportsStateBaseAddressTracking(device->getNEODevice()->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenGettingPlatformDefaultHeapAddressModelThenReturnPrivateHeaps) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel(device->getNEODevice()->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenCheckingL0HelperForCmdlistPrimaryBufferSupportThenReturnTrue) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.platformSupportsPrimaryBatchBufferCmdList());
|
||||
}
|
||||
|
||||
GEN11TEST_F(L0GfxCoreHelperTestGen11, GivenGen11WhenGettingSupportedRTASFormatThenExpectedFormatIsReturned) {
|
||||
const auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_EQ(ZE_RTAS_FORMAT_EXP_INVALID, l0GfxCoreHelper.getSupportedRTASFormat());
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/kernel/kernel_properties.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using KernelPropertyTest = Test<DeviceFixture>;
|
||||
|
||||
HWTEST2_F(KernelPropertyTest, givenKernelExtendedPropertiesStructureWhenKernelPropertiesCalledThenPropertiesAreCorrectlySet, IsGen11HP) {
|
||||
ze_device_module_properties_t kernelProperties = {};
|
||||
ze_float_atomic_ext_properties_t kernelExtendedProperties = {};
|
||||
kernelExtendedProperties.stype = ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES;
|
||||
kernelProperties.pNext = &kernelExtendedProperties;
|
||||
ze_result_t res = device->getKernelProperties(&kernelProperties);
|
||||
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
|
||||
|
||||
const auto &fp16Properties = kernelExtendedProperties.fp16Flags;
|
||||
EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::globalLoadStore);
|
||||
EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::localLoadStore);
|
||||
EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::globalMinMax);
|
||||
EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::localMinMax);
|
||||
|
||||
EXPECT_FALSE(fp16Properties & FpAtomicExtFlags::globalAdd);
|
||||
EXPECT_FALSE(fp16Properties & FpAtomicExtFlags::localAdd);
|
||||
|
||||
const auto &fp32Properties = kernelExtendedProperties.fp32Flags;
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalLoadStore);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localLoadStore);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalMinMax);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localMinMax);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalAdd);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localAdd);
|
||||
|
||||
const auto &fp64Properties = kernelExtendedProperties.fp64Flags;
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalLoadStore);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localLoadStore);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalMinMax);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localMinMax);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalAdd);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localAdd);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,20 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(TESTS_GEN9)
|
||||
target_sources(${TARGET_NAME} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_append_launch_kernel_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_append_range_barrier_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_create_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cmdlist_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cmdqueue_enqueuecommandlist_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_cmdqueue_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_device_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_l0_gfx_core_helper_gen9.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/test_module_gen9.cpp
|
||||
)
|
||||
endif()
|
||||
@@ -1,58 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/reg_configs.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/module_fixture.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using CommandListAppendLaunchKernel = Test<ModuleFixture>;
|
||||
using IsGen9Core = IsWithinProducts<IGFX_SKYLAKE, IGFX_COFFEELAKE>;
|
||||
|
||||
HWTEST2_F(CommandListAppendLaunchKernel, givenKernelWithSLMThenL3IsProgrammedWithSLMValue, IsGen9Core) {
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
createKernel();
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
|
||||
ze_group_count_t groupCount{1, 1, 1};
|
||||
|
||||
EXPECT_LE(0u, kernel->kernelImmData->getDescriptor().kernelAttributes.slmInlineSize);
|
||||
|
||||
CmdListKernelLaunchParams launchParams = {};
|
||||
auto result = commandList->appendLaunchKernel(kernel->toHandle(), groupCount, nullptr, 0, nullptr, launchParams, false);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
auto usedSpaceAfter = commandList->getCmdContainer().getCommandStream()->getUsed();
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), usedSpaceAfter));
|
||||
|
||||
bool foundL3 = false;
|
||||
for (auto it = cmdList.begin(); it != cmdList.end(); it++) {
|
||||
auto lri = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (lri) {
|
||||
if (lri->getRegisterOffset() == NEO::L3CNTLRegisterOffset<FamilyType>::registerOffset) {
|
||||
auto value = lri->getDataDword();
|
||||
auto dataSlm = NEO::PreambleHelper<FamilyType>::getL3Config(commandList->getCmdContainer().getDevice()->getHardwareInfo(), true);
|
||||
EXPECT_EQ(dataSlm, value);
|
||||
foundL3 = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EXPECT_TRUE(foundL3);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,120 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/source/event/event.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using CommandListAppendGen9 = Test<DeviceFixture>;
|
||||
|
||||
TEST(CommandListAppendMemoryRangesBarrier, WhenAppendingMemoryRangesBarrierThenSuccessIsReturned) {
|
||||
MockCommandList commandList;
|
||||
|
||||
uint32_t numRanges = 1;
|
||||
const size_t pRangeSizes = 1;
|
||||
const char *ranges[pRangeSizes];
|
||||
const void **pRanges = reinterpret_cast<const void **>(&ranges[0]);
|
||||
|
||||
auto result = zeCommandListAppendMemoryRangesBarrier(commandList.toHandle(),
|
||||
numRanges, &pRangeSizes,
|
||||
pRanges, nullptr, 0,
|
||||
nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppendGen9, WhenAppendingMemoryRangesBarrierThenPipeControlAddedToCommandStream, IsGen9) {
|
||||
uint32_t numRanges = 1;
|
||||
const size_t pRangeSizes = 1;
|
||||
const char *ranges[pRangeSizes];
|
||||
const void **pRanges = reinterpret_cast<const void **>(&ranges[0]);
|
||||
|
||||
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
|
||||
bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u);
|
||||
ASSERT_FALSE(ret);
|
||||
auto usedSpaceBefore =
|
||||
commandList->getCmdContainer().getCommandStream()->getUsed();
|
||||
commandList->appendMemoryRangesBarrier(numRanges, &pRangeSizes, pRanges,
|
||||
nullptr, 0, nullptr);
|
||||
auto usedSpaceAfter =
|
||||
commandList->getCmdContainer().getCommandStream()->getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList,
|
||||
ptrOffset(
|
||||
commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0),
|
||||
usedSpaceAfter));
|
||||
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
auto itorPC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_NE(cmdList.end(), itorPC);
|
||||
|
||||
auto cmd = genCmdCast<PIPE_CONTROL *>(*itorPC);
|
||||
EXPECT_TRUE(cmd->getCommandStreamerStallEnable());
|
||||
EXPECT_TRUE(cmd->getDcFlushEnable());
|
||||
|
||||
commandList->destroy();
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListAppendGen9, givenSignalEventWhenAppendingMemoryRangesBarrierThenSecondPipeControlAddedToCommandStreamForCompletion, IsGen9) {
|
||||
uint32_t numRanges = 1;
|
||||
const size_t pRangeSizes = 1;
|
||||
const char *ranges[pRangeSizes];
|
||||
const void **pRanges = reinterpret_cast<const void **>(&ranges[0]);
|
||||
|
||||
auto commandList = new CommandListCoreFamily<gfxCoreFamily>();
|
||||
bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u);
|
||||
ASSERT_FALSE(ret);
|
||||
ze_event_pool_desc_t eventPoolDesc = {
|
||||
ZE_STRUCTURE_TYPE_EVENT_POOL_DESC,
|
||||
nullptr,
|
||||
ZE_EVENT_POOL_FLAG_HOST_VISIBLE,
|
||||
1};
|
||||
|
||||
const ze_event_desc_t eventDesc = {
|
||||
ZE_STRUCTURE_TYPE_EVENT_DESC,
|
||||
nullptr,
|
||||
0,
|
||||
ZE_EVENT_SCOPE_FLAG_HOST,
|
||||
ZE_EVENT_SCOPE_FLAG_HOST};
|
||||
|
||||
ze_result_t result = ZE_RESULT_SUCCESS;
|
||||
auto context = std::make_unique<ContextImp>(device->getDriverHandle());
|
||||
auto hDevice = device->toHandle();
|
||||
auto eventPool = whiteboxCast(EventPool::create(device->getDriverHandle(), context.get(), 1, &hDevice, &eventPoolDesc, result));
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
auto event = whiteboxCast(Event::create<typename FamilyType::TimestampPacketType>(eventPool, &eventDesc, device));
|
||||
auto usedSpaceBefore =
|
||||
commandList->getCmdContainer().getCommandStream()->getUsed();
|
||||
commandList->appendMemoryRangesBarrier(numRanges, &pRangeSizes, pRanges,
|
||||
event->toHandle(), 0, nullptr);
|
||||
auto usedSpaceAfter = commandList->getCmdContainer().getCommandStream()->getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
// Ensure we have two pipe controls: one for barrier, one for signal
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), usedSpaceAfter));
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
auto itor = findAll<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_FALSE(itor.empty());
|
||||
ASSERT_LT(1, static_cast<int>(itor.size()));
|
||||
|
||||
delete event;
|
||||
delete eventPool;
|
||||
commandList->destroy();
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,212 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/execution_environment/root_device_environment.h"
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "level_zero/core/source/event/event.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_kernel.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_module.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
class CommandListCreateGen9 : public DeviceFixture, public testing::Test {
|
||||
public:
|
||||
void SetUp() override {
|
||||
DeviceFixture::setUp();
|
||||
|
||||
dispatchKernelArguments.groupCountX = 1u;
|
||||
dispatchKernelArguments.groupCountY = 2u;
|
||||
dispatchKernelArguments.groupCountZ = 3u;
|
||||
}
|
||||
|
||||
void TearDown() override {
|
||||
if (buffer) {
|
||||
alignedFree(buffer);
|
||||
}
|
||||
for (auto ptr : isaBuffers) {
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
DeviceFixture::tearDown();
|
||||
}
|
||||
|
||||
std::vector<std::unique_ptr<L0::ult::Module>> mockModules;
|
||||
std::vector<void *> isaBuffers;
|
||||
ze_group_count_t dispatchKernelArguments;
|
||||
void *buffer = nullptr;
|
||||
|
||||
void initializeKernel(WhiteBox<::L0::KernelImp> &kernel,
|
||||
WhiteBox<::L0::KernelImmutableData> &kernelData,
|
||||
L0::Device *device) {
|
||||
|
||||
uint32_t isaSize = 4096;
|
||||
void *isaBuffer = malloc(isaSize);
|
||||
isaBuffers.push_back(isaBuffer);
|
||||
|
||||
kernelData.device = device;
|
||||
if (!buffer) {
|
||||
buffer = alignedMalloc(isaSize, 64);
|
||||
}
|
||||
auto allocation = new NEO::GraphicsAllocation(0,
|
||||
1u /*num gmms*/,
|
||||
NEO::AllocationType::internalHostMemory,
|
||||
buffer,
|
||||
reinterpret_cast<uint64_t>(buffer),
|
||||
0,
|
||||
isaSize,
|
||||
MemoryPool::system4KBPages,
|
||||
MemoryManager::maxOsContextCount);
|
||||
if (isaBuffer != nullptr) {
|
||||
memcpy_s(allocation->getUnderlyingBuffer(), allocation->getUnderlyingBufferSize(), isaBuffer, isaSize);
|
||||
}
|
||||
kernelData.isaGraphicsAllocation.reset(allocation);
|
||||
|
||||
uint32_t crossThreadDataSize = 128;
|
||||
|
||||
kernel.crossThreadData.reset(new uint8_t[crossThreadDataSize]);
|
||||
kernel.crossThreadDataSize = crossThreadDataSize;
|
||||
|
||||
uint32_t perThreadDataSize = 128;
|
||||
|
||||
kernel.perThreadDataForWholeThreadGroup = static_cast<uint8_t *>(alignedMalloc(perThreadDataSize, 32));
|
||||
kernel.perThreadDataSize = perThreadDataSize;
|
||||
|
||||
kernel.kernelImmData = &kernelData;
|
||||
|
||||
kernel.groupSize[0] = 1;
|
||||
kernel.groupSize[1] = 1;
|
||||
kernel.groupSize[2] = 1;
|
||||
|
||||
mockModules.emplace_back(std::make_unique<L0::ult::Module>(device, nullptr, ModuleType::builtin));
|
||||
kernel.module = mockModules.back().get();
|
||||
}
|
||||
void cleanupKernel(WhiteBox<::L0::KernelImmutableData> &kernelData) {
|
||||
kernelData.isaGraphicsAllocation.reset(nullptr);
|
||||
}
|
||||
};
|
||||
|
||||
GEN9TEST_F(CommandListCreateGen9, WhenGettingCommandListPreemptionModeThenMatchesDevicePreemptionMode) {
|
||||
ze_result_t returnValue;
|
||||
auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
|
||||
|
||||
auto result = commandList->close();
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
EXPECT_EQ(device->getDevicePreemptionMode(), commandList->getCommandListPreemptionMode());
|
||||
|
||||
delete commandList;
|
||||
}
|
||||
|
||||
GEN9TEST_F(CommandListCreateGen9, GivenDisabledMidThreadPreemptionWhenLaunchingKernelThenThreadGroupModeSet) {
|
||||
WhiteBox<::L0::KernelImmutableData> kernelInfoThreadGroupData = {};
|
||||
NEO::KernelDescriptor kernelDescriptor;
|
||||
kernelInfoThreadGroupData.kernelDescriptor = &kernelDescriptor;
|
||||
WhiteBox<::L0::KernelImp> kernelThreadGroup;
|
||||
|
||||
kernelInfoThreadGroupData.kernelDescriptor->kernelAttributes.flags.requiresDisabledMidThreadPreemption = 1;
|
||||
|
||||
initializeKernel(kernelThreadGroup, kernelInfoThreadGroupData, device);
|
||||
|
||||
ze_result_t returnValue;
|
||||
auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
|
||||
EXPECT_EQ(NEO::PreemptionMode::MidThread, commandList->getCommandListPreemptionMode());
|
||||
|
||||
CmdListKernelLaunchParams launchParams = {};
|
||||
commandList->appendLaunchKernel(kernelThreadGroup.toHandle(),
|
||||
dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false);
|
||||
EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode());
|
||||
|
||||
auto result = commandList->close();
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode());
|
||||
cleanupKernel(kernelInfoThreadGroupData);
|
||||
delete commandList;
|
||||
}
|
||||
|
||||
GEN9TEST_F(CommandListCreateGen9, GivenUsesFencesForReadWriteImagesWhenLaunchingKernelThenMidBatchModeSet) {
|
||||
WhiteBox<::L0::KernelImmutableData> kernelInfoMidBatchData = {};
|
||||
NEO::KernelDescriptor kernelDescriptor;
|
||||
kernelInfoMidBatchData.kernelDescriptor = &kernelDescriptor;
|
||||
WhiteBox<::L0::KernelImp> kernelMidBatch;
|
||||
|
||||
kernelInfoMidBatchData.kernelDescriptor->kernelAttributes.flags.requiresDisabledMidThreadPreemption = 1;
|
||||
kernelInfoMidBatchData.kernelDescriptor->kernelAttributes.flags.usesFencesForReadWriteImages = 1;
|
||||
|
||||
device->getNEODevice()->getRootDeviceEnvironment().getMutableHardwareInfo()->workaroundTable.flags.waDisableLSQCROPERFforOCL = true;
|
||||
|
||||
initializeKernel(kernelMidBatch, kernelInfoMidBatchData, device);
|
||||
|
||||
ze_result_t returnValue;
|
||||
auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
|
||||
EXPECT_EQ(NEO::PreemptionMode::MidThread, commandList->getCommandListPreemptionMode());
|
||||
|
||||
CmdListKernelLaunchParams launchParams = {};
|
||||
commandList->appendLaunchKernel(kernelMidBatch.toHandle(),
|
||||
dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false);
|
||||
EXPECT_EQ(NEO::PreemptionMode::MidBatch, commandList->getCommandListPreemptionMode());
|
||||
|
||||
auto result = commandList->close();
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
EXPECT_EQ(NEO::PreemptionMode::MidBatch, commandList->getCommandListPreemptionMode());
|
||||
cleanupKernel(kernelInfoMidBatchData);
|
||||
delete commandList;
|
||||
}
|
||||
|
||||
GEN9TEST_F(CommandListCreateGen9, WhenCommandListHasLowerPreemptionLevelThenDoNotIncreaseAgain) {
|
||||
WhiteBox<::L0::KernelImmutableData> kernelInfoThreadGroupData = {};
|
||||
NEO::KernelDescriptor kernelDescriptor;
|
||||
kernelInfoThreadGroupData.kernelDescriptor = &kernelDescriptor;
|
||||
WhiteBox<::L0::KernelImp> kernelThreadGroup;
|
||||
|
||||
kernelInfoThreadGroupData.kernelDescriptor->kernelAttributes.flags.requiresDisabledMidThreadPreemption = 1;
|
||||
|
||||
initializeKernel(kernelThreadGroup, kernelInfoThreadGroupData, device);
|
||||
|
||||
WhiteBox<::L0::KernelImmutableData> kernelInfoMidThreadData = {};
|
||||
NEO::KernelDescriptor kernelDescriptor2;
|
||||
kernelInfoMidThreadData.kernelDescriptor = &kernelDescriptor2;
|
||||
|
||||
WhiteBox<::L0::KernelImp> kernelMidThread;
|
||||
|
||||
initializeKernel(kernelMidThread, kernelInfoMidThreadData, device);
|
||||
|
||||
ze_result_t returnValue;
|
||||
auto commandList = whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
|
||||
EXPECT_EQ(NEO::PreemptionMode::MidThread, commandList->getCommandListPreemptionMode());
|
||||
|
||||
CmdListKernelLaunchParams launchParams = {};
|
||||
commandList->appendLaunchKernel(kernelThreadGroup.toHandle(),
|
||||
dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false);
|
||||
EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode());
|
||||
|
||||
commandList->appendLaunchKernel(kernelMidThread.toHandle(),
|
||||
dispatchKernelArguments, nullptr, 0, nullptr, launchParams, false);
|
||||
EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode());
|
||||
|
||||
auto result = commandList->close();
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
EXPECT_EQ(NEO::PreemptionMode::ThreadGroup, commandList->getCommandListPreemptionMode());
|
||||
cleanupKernel(kernelInfoThreadGroupData);
|
||||
cleanupKernel(kernelInfoMidThreadData);
|
||||
delete commandList;
|
||||
}
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,116 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen9/reg_configs.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/source/gen9/cmdlist_gen9.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using CommandListProgramL3 = Test<DeviceFixture>;
|
||||
|
||||
template <PRODUCT_FAMILY productFamily>
|
||||
struct CommandListAdjustStateComputeMode : public WhiteBox<::L0::CommandListProductFamily<productFamily>> {
|
||||
CommandListAdjustStateComputeMode() : WhiteBox<::L0::CommandListProductFamily<productFamily>>(1) {}
|
||||
};
|
||||
|
||||
HWTEST2_F(CommandListProgramL3, givenAllocationsWhenProgramL3ThenMmioIsAppended, IsGen9) {
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;
|
||||
const uint32_t registerOffset = NEO::L3CNTLRegisterOffset<GfxFamily>::registerOffset;
|
||||
|
||||
auto commandList = new CommandListAdjustStateComputeMode<productFamily>();
|
||||
bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u);
|
||||
ASSERT_FALSE(ret);
|
||||
|
||||
commandList->programL3(false);
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), commandList->getCmdContainer().getCommandStream()->getUsed()));
|
||||
bool found = false;
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
for (auto itor : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*itor);
|
||||
if (registerOffset == cmd->getRegisterOffset()) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPECT_TRUE(found);
|
||||
|
||||
commandList->destroy();
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListProgramL3, givenAllocationsWhenProgramL3WithSlmThenMmioIsAppendedWithSlm, IsGen9) {
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;
|
||||
const uint32_t registerOffset = NEO::L3CNTLRegisterOffset<GfxFamily>::registerOffset;
|
||||
auto hwInfo = device->getNEODevice()->getHardwareInfo();
|
||||
const uint32_t valueForSLM = NEO::PreambleHelper<GfxFamily>::getL3Config(hwInfo, true);
|
||||
|
||||
auto commandList = new CommandListAdjustStateComputeMode<productFamily>();
|
||||
bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u);
|
||||
ASSERT_FALSE(ret);
|
||||
|
||||
commandList->programL3(true);
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), commandList->getCmdContainer().getCommandStream()->getUsed()));
|
||||
bool found = false;
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
for (auto itor : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*itor);
|
||||
if (registerOffset == cmd->getRegisterOffset()) {
|
||||
EXPECT_EQ(cmd->getRegisterOffset(), registerOffset);
|
||||
EXPECT_EQ(cmd->getDataDword(), valueForSLM);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPECT_TRUE(found);
|
||||
|
||||
commandList->destroy();
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandListProgramL3, givenAllocationsWhenProgramL3WithoutSlmThenMmioIsAppendedWithoutSlm, IsGen9) {
|
||||
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
|
||||
using MI_LOAD_REGISTER_IMM = typename GfxFamily::MI_LOAD_REGISTER_IMM;
|
||||
const uint32_t registerOffset = NEO::L3CNTLRegisterOffset<GfxFamily>::registerOffset;
|
||||
const uint32_t valueForNoSLM = NEO::PreambleHelper<GfxFamily>::getL3Config(*defaultHwInfo, false);
|
||||
|
||||
auto commandList = new CommandListAdjustStateComputeMode<productFamily>();
|
||||
bool ret = commandList->initialize(device, NEO::EngineGroupType::renderCompute, 0u);
|
||||
ASSERT_FALSE(ret);
|
||||
|
||||
commandList->programL3(false);
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0), commandList->getCmdContainer().getCommandStream()->getUsed()));
|
||||
bool found = false;
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
for (auto itor : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*itor);
|
||||
if (registerOffset == cmd->getRegisterOffset()) {
|
||||
EXPECT_EQ(cmd->getRegisterOffset(), registerOffset);
|
||||
EXPECT_EQ(cmd->getDataDword(), valueForNoSLM);
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
EXPECT_TRUE(found);
|
||||
|
||||
commandList->destroy();
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,267 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/command_stream/linear_stream.h"
|
||||
#include "shared/source/command_stream/preemption.h"
|
||||
#include "shared/source/gen9/hw_cmds.h"
|
||||
#include "shared/source/gmm_helper/gmm_helper.h"
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
#include "shared/source/memory_manager/graphics_allocation.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/mocks/mock_device.h"
|
||||
#include "shared/test/common/test_macros/header/per_product_test_definitions.h"
|
||||
#include "shared/test/common/test_macros/test.h"
|
||||
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_device.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_memory_manager.h"
|
||||
#include <level_zero/ze_api.h>
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
|
||||
#include <limits>
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using CommandQueueExecuteCommandListsGen9 = Test<DeviceFixture>;
|
||||
|
||||
GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenPipelineSelectAndVfeStateAreAddedToCmdBuffer) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
ze_result_t returnValue;
|
||||
auto commandQueue = whiteboxCast(CommandQueue::create(
|
||||
productFamily,
|
||||
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
auto commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false);
|
||||
commandList->close();
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
commandList->toHandle()};
|
||||
uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true, nullptr);
|
||||
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
auto usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter));
|
||||
|
||||
using MEDIA_VFE_STATE = typename FamilyType::MEDIA_VFE_STATE;
|
||||
auto itorVFE = find<MEDIA_VFE_STATE *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_NE(itorVFE, cmdList.end());
|
||||
|
||||
// Should have a PS before a VFE
|
||||
using PIPELINE_SELECT = typename FamilyType::PIPELINE_SELECT;
|
||||
auto itorPS = find<PIPELINE_SELECT *>(cmdList.begin(), itorVFE);
|
||||
ASSERT_NE(itorPS, itorVFE);
|
||||
{
|
||||
auto cmd = genCmdCast<PIPELINE_SELECT *>(*itorPS);
|
||||
EXPECT_EQ(cmd->getMaskBits() & 3u, 3u);
|
||||
EXPECT_EQ(cmd->getPipelineSelection(), PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU);
|
||||
}
|
||||
|
||||
commandList->destroy();
|
||||
commandQueue->destroy();
|
||||
}
|
||||
|
||||
GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenStateBaseAddressForGeneralStateBaseAddressIsAdded) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
ze_result_t returnValue;
|
||||
auto commandQueue = whiteboxCast(CommandQueue::create(
|
||||
productFamily,
|
||||
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
auto commandList = CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false);
|
||||
commandList->close();
|
||||
ze_command_list_handle_t commandLists[] = {
|
||||
commandList->toHandle()};
|
||||
uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true, nullptr);
|
||||
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
auto usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter));
|
||||
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
|
||||
|
||||
auto itorSba = find<STATE_BASE_ADDRESS *>(cmdList.begin(), cmdList.end());
|
||||
ASSERT_NE(itorSba, cmdList.end());
|
||||
{
|
||||
auto cmd = genCmdCast<STATE_BASE_ADDRESS *>(*itorSba);
|
||||
EXPECT_TRUE(cmd->getGeneralStateBaseAddressModifyEnable());
|
||||
EXPECT_EQ(0u, cmd->getGeneralStateBaseAddress());
|
||||
EXPECT_TRUE(cmd->getGeneralStateBufferSizeModifyEnable());
|
||||
uint32_t expectedGsbaSize = std::numeric_limits<uint32_t>::max();
|
||||
expectedGsbaSize >>= 12;
|
||||
EXPECT_EQ(expectedGsbaSize, cmd->getGeneralStateBufferSize());
|
||||
|
||||
EXPECT_TRUE(cmd->getInstructionBaseAddressModifyEnable());
|
||||
EXPECT_TRUE(cmd->getInstructionBufferSizeModifyEnable());
|
||||
EXPECT_EQ(MemoryConstants::sizeOf4GBinPageEntities, cmd->getInstructionBufferSize());
|
||||
EXPECT_EQ(device->getDriverHandle()->getMemoryManager()->getInternalHeapBaseAddress(0, false),
|
||||
cmd->getInstructionBaseAddress());
|
||||
EXPECT_EQ(commandQueue->getDevice()->getNEODevice()->getGmmHelper()->getMOCS(GMM_RESOURCE_USAGE_OCL_STATE_HEAP_BUFFER),
|
||||
cmd->getInstructionMemoryObjectControlState());
|
||||
}
|
||||
|
||||
commandList->destroy();
|
||||
commandQueue->destroy();
|
||||
}
|
||||
|
||||
GEN9TEST_F(CommandQueueExecuteCommandListsGen9, WhenExecutingCmdListsThenMidThreadPreemptionForFirstExecuteIsConfigured) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
ze_result_t returnValue;
|
||||
auto commandQueue = whiteboxCast(CommandQueue::create(
|
||||
productFamily,
|
||||
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
auto commandList = CommandList::whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
|
||||
commandList->commandListPreemptionMode = NEO::PreemptionMode::MidThread;
|
||||
commandList->close();
|
||||
|
||||
ze_command_list_handle_t commandLists[] = {commandList->toHandle()};
|
||||
uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true, nullptr);
|
||||
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
auto usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter));
|
||||
using STATE_SIP = typename FamilyType::STATE_SIP;
|
||||
using GPGPU_CSR_BASE_ADDRESS = typename FamilyType::GPGPU_CSR_BASE_ADDRESS;
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto itorCsr = find<GPGPU_CSR_BASE_ADDRESS *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_NE(itorCsr, cmdList.end());
|
||||
|
||||
auto itorStateSip = find<STATE_SIP *>(itorCsr, cmdList.end());
|
||||
EXPECT_NE(itorStateSip, cmdList.end());
|
||||
|
||||
auto itorLri = find<MI_LOAD_REGISTER_IMM *>(itorStateSip, cmdList.end());
|
||||
EXPECT_NE(itorLri, cmdList.end());
|
||||
|
||||
MI_LOAD_REGISTER_IMM *lriCmd = static_cast<MI_LOAD_REGISTER_IMM *>(*itorLri);
|
||||
EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset());
|
||||
uint32_t data = ((1 << 1) | (1 << 2)) << 16;
|
||||
EXPECT_EQ(data, lriCmd->getDataDword());
|
||||
|
||||
commandList->destroy();
|
||||
commandQueue->destroy();
|
||||
}
|
||||
|
||||
GEN9TEST_F(CommandQueueExecuteCommandListsGen9, GivenCmdListsWithDifferentPreemptionModesWhenExecutingThenQueuePreemptionIsSwitchedFromMidThreadToThreadGroupAndMidThread) {
|
||||
const ze_command_queue_desc_t desc = {};
|
||||
ze_result_t returnValue;
|
||||
auto commandQueue = whiteboxCast(CommandQueue::create(
|
||||
productFamily,
|
||||
device, neoDevice->getDefaultEngine().commandStreamReceiver, &desc, false, false, false, returnValue));
|
||||
ASSERT_NE(nullptr, commandQueue);
|
||||
auto usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
auto commandListMidThread = CommandList::whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
|
||||
commandListMidThread->commandListPreemptionMode = NEO::PreemptionMode::MidThread;
|
||||
commandListMidThread->close();
|
||||
|
||||
auto commandListThreadGroup = CommandList::whiteboxCast(CommandList::create(productFamily, device, NEO::EngineGroupType::renderCompute, 0u, returnValue, false));
|
||||
commandListThreadGroup->commandListPreemptionMode = NEO::PreemptionMode::ThreadGroup;
|
||||
commandListThreadGroup->close();
|
||||
|
||||
ze_command_list_handle_t commandLists[] = {commandListMidThread->toHandle(),
|
||||
commandListThreadGroup->toHandle(),
|
||||
commandListMidThread->toHandle()};
|
||||
uint32_t numCommandLists = sizeof(commandLists) / sizeof(commandLists[0]);
|
||||
auto result = commandQueue->executeCommandLists(numCommandLists, commandLists, nullptr, true, nullptr);
|
||||
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
auto usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, commandQueue->commandStream.getCpuBase(), usedSpaceAfter));
|
||||
using STATE_SIP = typename FamilyType::STATE_SIP;
|
||||
using GPGPU_CSR_BASE_ADDRESS = typename FamilyType::GPGPU_CSR_BASE_ADDRESS;
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
auto itorCsr = find<GPGPU_CSR_BASE_ADDRESS *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_NE(itorCsr, cmdList.end());
|
||||
|
||||
auto itorStateSip = find<STATE_SIP *>(itorCsr, cmdList.end());
|
||||
EXPECT_NE(itorStateSip, cmdList.end());
|
||||
|
||||
auto itorLri = find<MI_LOAD_REGISTER_IMM *>(itorStateSip, cmdList.end());
|
||||
EXPECT_NE(itorLri, cmdList.end());
|
||||
|
||||
MI_LOAD_REGISTER_IMM *lriCmd = static_cast<MI_LOAD_REGISTER_IMM *>(*itorLri);
|
||||
EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset());
|
||||
uint32_t data = ((1 << 1) | (1 << 2)) << 16;
|
||||
EXPECT_EQ(data, lriCmd->getDataDword());
|
||||
|
||||
// next should be BB_START to 1st Mid-Thread Cmd List
|
||||
auto itorBBStart = find<MI_BATCH_BUFFER_START *>(itorLri, cmdList.end());
|
||||
EXPECT_NE(itorBBStart, cmdList.end());
|
||||
|
||||
// next should be PIPE_CONTROL and LRI switching to thread-group
|
||||
auto itorPipeControl = find<PIPE_CONTROL *>(itorBBStart, cmdList.end());
|
||||
EXPECT_NE(itorPipeControl, cmdList.end());
|
||||
|
||||
itorLri = find<MI_LOAD_REGISTER_IMM *>(itorPipeControl, cmdList.end());
|
||||
EXPECT_NE(itorLri, cmdList.end());
|
||||
|
||||
lriCmd = static_cast<MI_LOAD_REGISTER_IMM *>(*itorLri);
|
||||
EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset());
|
||||
data = (1 << 1) | (((1 << 1) | (1 << 2)) << 16);
|
||||
EXPECT_EQ(data, lriCmd->getDataDword());
|
||||
// start of thread-group command list
|
||||
itorBBStart = find<MI_BATCH_BUFFER_START *>(itorLri, cmdList.end());
|
||||
EXPECT_NE(itorBBStart, cmdList.end());
|
||||
|
||||
// next should be PIPE_CONTROL and LRI switching to mid-thread again
|
||||
itorPipeControl = find<PIPE_CONTROL *>(itorBBStart, cmdList.end());
|
||||
EXPECT_NE(itorPipeControl, cmdList.end());
|
||||
|
||||
itorLri = find<MI_LOAD_REGISTER_IMM *>(itorPipeControl, cmdList.end());
|
||||
EXPECT_NE(itorLri, cmdList.end());
|
||||
|
||||
lriCmd = static_cast<MI_LOAD_REGISTER_IMM *>(*itorLri);
|
||||
EXPECT_EQ(0x2580u, lriCmd->getRegisterOffset());
|
||||
data = ((1 << 1) | (1 << 2)) << 16;
|
||||
EXPECT_EQ(data, lriCmd->getDataDword());
|
||||
// start of thread-group command list
|
||||
itorBBStart = find<MI_BATCH_BUFFER_START *>(itorLri, cmdList.end());
|
||||
EXPECT_NE(itorBBStart, cmdList.end());
|
||||
|
||||
commandListMidThread->destroy();
|
||||
commandListThreadGroup->destroy();
|
||||
commandQueue->destroy();
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,166 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/built_ins/sip.h"
|
||||
#include "shared/source/gen9/reg_configs.h"
|
||||
#include "shared/test/common/cmd_parse/gen_cmd_parse.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/test/unit_tests/fixtures/cmdlist_fixture.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_built_ins.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdlist.h"
|
||||
#include "level_zero/core/test/unit_tests/mocks/mock_cmdqueue.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using CommandQueueThreadArbitrationPolicyTests = Test<CommandQueueThreadArbitrationPolicyFixture>;
|
||||
|
||||
HWTEST2_F(CommandQueueThreadArbitrationPolicyTests,
|
||||
whenCommandListIsExecutedThenDefaultRoundRobinThreadArbitrationPolicyIsUsed,
|
||||
IsGen9) {
|
||||
size_t usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
ze_command_list_handle_t hCommandList = commandList->toHandle();
|
||||
auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
size_t usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin),
|
||||
cmd->getDataDword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandQueueThreadArbitrationPolicyTests,
|
||||
whenCommandListIsExecutedAndOverrideThreadArbitrationPolicyDebugFlagIsSetToZeroThenAgeBasedThreadArbitrationPolicyIsUsed,
|
||||
IsGen9) {
|
||||
debugManager.flags.OverrideThreadArbitrationPolicy.set(0);
|
||||
|
||||
size_t usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
ze_command_list_handle_t hCommandList = commandList->toHandle();
|
||||
auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
size_t usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::AgeBased),
|
||||
cmd->getDataDword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandQueueThreadArbitrationPolicyTests,
|
||||
whenCommandListIsExecutedAndOverrideThreadArbitrationPolicyDebugFlagIsSetToOneThenRoundRobinThreadArbitrationPolicyIsUsed,
|
||||
IsGen9) {
|
||||
debugManager.flags.OverrideThreadArbitrationPolicy.set(1);
|
||||
|
||||
size_t usedSpaceBefore = commandQueue->commandStream.getUsed();
|
||||
|
||||
ze_command_list_handle_t hCommandList = commandList->toHandle();
|
||||
auto result = commandQueue->executeCommandLists(1, &hCommandList, nullptr, true, nullptr);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, result);
|
||||
|
||||
size_t usedSpaceAfter = commandQueue->commandStream.getUsed();
|
||||
ASSERT_GT(usedSpaceAfter, usedSpaceBefore);
|
||||
|
||||
GenCmdList cmdList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
cmdList, ptrOffset(commandQueue->commandStream.getCpuBase(), 0), usedSpaceAfter));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin),
|
||||
cmd->getDataDword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct CommandQueueGroupMultiDeviceFixture : public MultiDeviceFixture {
|
||||
void setUp() {
|
||||
MultiDeviceFixture::setUp();
|
||||
uint32_t count = 1;
|
||||
ze_device_handle_t hDevice;
|
||||
ze_result_t res = driverHandle->getDevice(&count, &hDevice);
|
||||
ASSERT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
device = L0::Device::fromHandle(hDevice);
|
||||
ASSERT_NE(nullptr, device);
|
||||
}
|
||||
void tearDown() {
|
||||
MultiDeviceFixture::tearDown();
|
||||
}
|
||||
L0::Device *device = nullptr;
|
||||
};
|
||||
|
||||
using CommandQueueGroupMultiDevice = Test<CommandQueueGroupMultiDeviceFixture>;
|
||||
|
||||
HWTEST2_F(CommandQueueGroupMultiDevice,
|
||||
givenCommandQueuePropertiesCallThenCallSucceedsAndCommandListImmediateIsCreated, IsGen9) {
|
||||
uint32_t count = 0;
|
||||
ze_result_t res = device->getCommandQueueGroupProperties(&count, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
EXPECT_GE(count, 1u);
|
||||
|
||||
std::vector<ze_command_queue_group_properties_t> queueProperties(count);
|
||||
res = device->getCommandQueueGroupProperties(&count, queueProperties.data());
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
|
||||
uint32_t queueGroupOrdinal = 0u;
|
||||
uint32_t queueGroupIndex = 0u;
|
||||
ze_command_queue_desc_t desc = {};
|
||||
desc.ordinal = queueGroupOrdinal;
|
||||
desc.index = queueGroupIndex;
|
||||
|
||||
ze_result_t returnValue;
|
||||
std::unique_ptr<L0::CommandList> commandList0(CommandList::createImmediate(productFamily,
|
||||
device,
|
||||
&desc,
|
||||
false,
|
||||
NEO::EngineGroupType::renderCompute,
|
||||
returnValue));
|
||||
auto whiteBoxCmdList = static_cast<CommandList *>(commandList0.get());
|
||||
|
||||
L0::CommandQueueImp *cmdQueue = reinterpret_cast<CommandQueueImp *>(whiteBoxCmdList->cmdQImmediate);
|
||||
auto &nearestSubDevice = *device->getNEODevice()->getNearestGenericSubDevice(0);
|
||||
const auto rcsIndex = nearestSubDevice.getEngineGroupIndexFromEngineGroupType(NEO::EngineGroupType::renderCompute);
|
||||
auto expectedCSR = nearestSubDevice.getRegularEngineGroups()[rcsIndex].engines[queueGroupIndex].commandStreamReceiver;
|
||||
EXPECT_EQ(cmdQueue->getCsr(), expectedCSR);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,109 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/source/cmdlist/cmdlist.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
#include "level_zero/include/ze_intel_gpu.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using DevicePropertyTest = Test<DeviceFixture>;
|
||||
|
||||
HWTEST2_F(DevicePropertyTest, givenReturnedDevicePropertiesThenExpectedPropertiesFlagsSet, IsGen9) {
|
||||
ze_device_properties_t deviceProps = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||
|
||||
device->getProperties(&deviceProps);
|
||||
EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_ONDEMANDPAGING);
|
||||
EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_ECC);
|
||||
EXPECT_EQ(0u, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_SUBDEVICE);
|
||||
EXPECT_EQ(ZE_DEVICE_PROPERTY_FLAG_INTEGRATED, deviceProps.flags & ZE_DEVICE_PROPERTY_FLAG_INTEGRATED);
|
||||
}
|
||||
|
||||
using DeviceTestGen9 = Test<DeviceFixture>;
|
||||
|
||||
HWTEST2_F(DeviceTestGen9, GivenTargetGen9WhenGettingDpSupportThenReturnsFalseAndFlagsSetCorrectly, IsAtMostGen9) {
|
||||
ze_device_module_properties_t deviceModProps = {ZE_STRUCTURE_TYPE_DEVICE_MODULE_PROPERTIES};
|
||||
ze_intel_device_module_dp_exp_properties_t moduleDpProps = {ZE_STRUCTURE_INTEL_DEVICE_MODULE_DP_EXP_PROPERTIES};
|
||||
moduleDpProps.flags = 0u;
|
||||
deviceModProps.pNext = &moduleDpProps;
|
||||
|
||||
ze_result_t res = device->getKernelProperties(&deviceModProps);
|
||||
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
|
||||
|
||||
bool dp4a = moduleDpProps.flags & ZE_INTEL_DEVICE_MODULE_EXP_FLAG_DP4A;
|
||||
bool dpas = moduleDpProps.flags & ZE_INTEL_DEVICE_MODULE_EXP_FLAG_DPAS;
|
||||
EXPECT_FALSE(dp4a);
|
||||
EXPECT_FALSE(dpas);
|
||||
}
|
||||
|
||||
using CommandQueueGroupTest = Test<DeviceFixture>;
|
||||
|
||||
HWTEST2_F(CommandQueueGroupTest, givenCommandQueuePropertiesCallThenCorrectNumberOfGroupsIsReturned, IsGen9) {
|
||||
uint32_t count = 0;
|
||||
ze_result_t res = device->getCommandQueueGroupProperties(&count, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
EXPECT_EQ(1u, count);
|
||||
|
||||
ze_command_queue_group_properties_t properties;
|
||||
res = device->getCommandQueueGroupProperties(&count, &properties);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
|
||||
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
|
||||
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
|
||||
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
|
||||
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS);
|
||||
EXPECT_EQ(properties.numQueues, 1u);
|
||||
EXPECT_EQ(properties.maxMemoryFillPatternSize, std::numeric_limits<size_t>::max());
|
||||
}
|
||||
|
||||
HWTEST2_F(CommandQueueGroupTest, givenQueueGroupsReturnedThenCommandListIsCreatedCorrectly, IsGen9) {
|
||||
uint32_t count = 0;
|
||||
ze_result_t res = device->getCommandQueueGroupProperties(&count, nullptr);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
EXPECT_EQ(1u, count);
|
||||
|
||||
ze_command_queue_group_properties_t properties;
|
||||
res = device->getCommandQueueGroupProperties(&count, &properties);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
|
||||
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COMPUTE);
|
||||
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COPY);
|
||||
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_COOPERATIVE_KERNELS);
|
||||
EXPECT_TRUE(properties.flags & ZE_COMMAND_QUEUE_GROUP_PROPERTY_FLAG_METRICS);
|
||||
EXPECT_EQ(properties.numQueues, 1u);
|
||||
EXPECT_EQ(properties.maxMemoryFillPatternSize, std::numeric_limits<size_t>::max());
|
||||
|
||||
ze_context_handle_t hContext;
|
||||
ze_context_desc_t contextDesc = {ZE_STRUCTURE_TYPE_CONTEXT_DESC, nullptr, 0};
|
||||
res = driverHandle->createContext(&contextDesc, 0u, nullptr, &hContext);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
L0::Context *context = Context::fromHandle(hContext);
|
||||
|
||||
ze_command_list_desc_t listDesc = {};
|
||||
listDesc.commandQueueGroupOrdinal = 0;
|
||||
ze_command_list_handle_t hCommandList = {};
|
||||
|
||||
res = context->createCommandList(device, &listDesc, &hCommandList);
|
||||
EXPECT_EQ(ZE_RESULT_SUCCESS, res);
|
||||
|
||||
CommandList *commandList = CommandList::fromHandle(hCommandList);
|
||||
commandList->destroy();
|
||||
|
||||
context->destroy();
|
||||
}
|
||||
|
||||
HWTEST2_F(DevicePropertyTest, GivenGen9WhenGettingPhysicalEuSimdWidthThenReturn8, IsGen9) {
|
||||
ze_device_properties_t properties = {ZE_STRUCTURE_TYPE_DEVICE_PROPERTIES};
|
||||
device->getProperties(&properties);
|
||||
EXPECT_EQ(8u, properties.physicalEUSimdWidth);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/helpers/default_hw_info.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/source/gfx_core_helpers/l0_gfx_core_helper.h"
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using L0GfxCoreHelperTestGen9 = Test<DeviceFixture>;
|
||||
|
||||
GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForCmdListHeapSharingSupportThenReturnTrue) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.platformSupportsCmdListHeapSharing());
|
||||
}
|
||||
|
||||
GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForStateComputeModeTrackingSupportThenReturnFalse) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_FALSE(l0GfxCoreHelper.platformSupportsStateComputeModeTracking());
|
||||
}
|
||||
|
||||
GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForFrontEndTrackingSupportThenReturnFalse) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_FALSE(l0GfxCoreHelper.platformSupportsFrontEndTracking());
|
||||
}
|
||||
|
||||
GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForPipelineSelectTrackingSupportThenReturnFalse) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_FALSE(l0GfxCoreHelper.platformSupportsPipelineSelectTracking());
|
||||
}
|
||||
|
||||
GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForStateBaseAddressTrackingSupportThenReturnFalse) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_FALSE(l0GfxCoreHelper.platformSupportsStateBaseAddressTracking(device->getNEODevice()->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenGettingPlatformDefaultHeapAddressModelThenReturnPrivateHeaps) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_EQ(NEO::HeapAddressModel::privateHeaps, l0GfxCoreHelper.getPlatformHeapAddressModel(device->getNEODevice()->getRootDeviceEnvironment()));
|
||||
}
|
||||
|
||||
GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenCheckingL0HelperForCmdlistPrimaryBufferSupportThenReturnTrue) {
|
||||
auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_TRUE(l0GfxCoreHelper.platformSupportsPrimaryBatchBufferCmdList());
|
||||
}
|
||||
|
||||
GEN9TEST_F(L0GfxCoreHelperTestGen9, GivenGen9WhenGettingSupportedRTASFormatThenExpectedFormatIsReturned) {
|
||||
const auto &l0GfxCoreHelper = getHelper<L0GfxCoreHelper>();
|
||||
EXPECT_EQ(ZE_RTAS_FORMAT_EXP_INVALID, l0GfxCoreHelper.getSupportedRTASFormat());
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -1,60 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/kernel/kernel_properties.h"
|
||||
#include "shared/test/common/test_macros/hw_test.h"
|
||||
|
||||
#include "level_zero/core/test/unit_tests/fixtures/device_fixture.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace ult {
|
||||
|
||||
using KernelPropertyTest = Test<DeviceFixture>;
|
||||
|
||||
HWTEST2_F(KernelPropertyTest, givenReturnedKernelPropertiesThenExpectedDp4aSupportReturned, IsGen9) {
|
||||
ze_device_module_properties_t kernelProps = {};
|
||||
|
||||
device->getKernelProperties(&kernelProps);
|
||||
EXPECT_EQ(0u, kernelProps.flags & ZE_DEVICE_MODULE_FLAG_DP4A);
|
||||
}
|
||||
|
||||
HWTEST2_F(KernelPropertyTest, givenKernelExtendedPropertiesStructureWhenKernelPropertiesCalledThenPropertiesAreCorrectlySet, IsGen9) {
|
||||
ze_device_module_properties_t kernelProperties = {};
|
||||
ze_float_atomic_ext_properties_t kernelExtendedProperties = {};
|
||||
kernelExtendedProperties.stype = ZE_STRUCTURE_TYPE_FLOAT_ATOMIC_EXT_PROPERTIES;
|
||||
kernelProperties.pNext = &kernelExtendedProperties;
|
||||
ze_result_t res = device->getKernelProperties(&kernelProperties);
|
||||
EXPECT_EQ(res, ZE_RESULT_SUCCESS);
|
||||
|
||||
const auto &fp16Properties = kernelExtendedProperties.fp16Flags;
|
||||
EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::globalLoadStore);
|
||||
EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::localLoadStore);
|
||||
EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::globalMinMax);
|
||||
EXPECT_TRUE(fp16Properties & FpAtomicExtFlags::localMinMax);
|
||||
|
||||
EXPECT_FALSE(fp16Properties & FpAtomicExtFlags::globalAdd);
|
||||
EXPECT_FALSE(fp16Properties & FpAtomicExtFlags::localAdd);
|
||||
|
||||
const auto &fp32Properties = kernelExtendedProperties.fp32Flags;
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalLoadStore);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localLoadStore);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalMinMax);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localMinMax);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::globalAdd);
|
||||
EXPECT_TRUE(fp32Properties & FpAtomicExtFlags::localAdd);
|
||||
|
||||
const auto &fp64Properties = kernelExtendedProperties.fp64Flags;
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalLoadStore);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localLoadStore);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalMinMax);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localMinMax);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::globalAdd);
|
||||
EXPECT_TRUE(fp64Properties & FpAtomicExtFlags::localAdd);
|
||||
}
|
||||
|
||||
} // namespace ult
|
||||
} // namespace L0
|
||||
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "shared/source/command_container/implicit_scaling.h"
|
||||
#include "shared/source/gen9/reg_configs.h"
|
||||
#include "shared/source/helpers/compiler_product_helper.h"
|
||||
#include "shared/source/helpers/gfx_core_helper.h"
|
||||
#include "shared/source/helpers/local_id_gen.h"
|
||||
@@ -814,128 +813,6 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendMemoryC
|
||||
EXPECT_TRUE(tagFound);
|
||||
}
|
||||
|
||||
using CommandListArbitrationPolicyTest = Test<ModuleFixture>;
|
||||
|
||||
HWTEST_F(CommandListArbitrationPolicyTest, whenCreatingCommandListThenDefaultThreadArbitrationPolicyIsUsed) {
|
||||
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
|
||||
|
||||
ze_result_t returnValue;
|
||||
auto commandList = std::unique_ptr<CommandList>(CommandList::whiteboxCast(L0::CommandList::create(productFamily,
|
||||
device,
|
||||
NEO::EngineGroupType::renderCompute,
|
||||
0u,
|
||||
returnValue, false)));
|
||||
EXPECT_NE(nullptr, commandList);
|
||||
EXPECT_NE(nullptr, commandList->getCmdContainer().getCommandStream());
|
||||
|
||||
GenCmdList parsedCommandList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
parsedCommandList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0),
|
||||
commandList->getCmdContainer().getCommandStream()->getUsed()));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(parsedCommandList.begin(), parsedCommandList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin),
|
||||
cmd->getDataDword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(CommandListArbitrationPolicyTest, whenCreatingCommandListThenChosenThreadArbitrationPolicyIsUsed) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.OverrideThreadArbitrationPolicy.set(0);
|
||||
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
|
||||
|
||||
ze_result_t returnValue;
|
||||
auto commandList = std::unique_ptr<CommandList>(CommandList::whiteboxCast(L0::CommandList::create(productFamily,
|
||||
device,
|
||||
NEO::EngineGroupType::renderCompute,
|
||||
0u,
|
||||
returnValue, false)));
|
||||
EXPECT_NE(nullptr, commandList);
|
||||
EXPECT_NE(nullptr, commandList->getCmdContainer().getCommandStream());
|
||||
|
||||
GenCmdList parsedCommandList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
parsedCommandList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0),
|
||||
commandList->getCmdContainer().getCommandStream()->getUsed()));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(parsedCommandList.begin(), parsedCommandList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::AgeBased),
|
||||
cmd->getDataDword());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
HWTEST_F(CommandListArbitrationPolicyTest, whenCommandListIsResetThenOriginalThreadArbitrationPolicyIsKept) {
|
||||
using STATE_BASE_ADDRESS = typename FamilyType::STATE_BASE_ADDRESS;
|
||||
|
||||
ze_result_t returnValue;
|
||||
auto commandList = std::unique_ptr<CommandList>(CommandList::whiteboxCast(L0::CommandList::create(productFamily,
|
||||
device,
|
||||
NEO::EngineGroupType::renderCompute,
|
||||
0u,
|
||||
returnValue, false)));
|
||||
EXPECT_NE(nullptr, commandList);
|
||||
EXPECT_NE(nullptr, commandList->getCmdContainer().getCommandStream());
|
||||
|
||||
uint64_t originalThreadArbitrationPolicy = std::numeric_limits<uint64_t>::max();
|
||||
{
|
||||
GenCmdList parsedCommandList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
parsedCommandList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0),
|
||||
commandList->getCmdContainer().getCommandStream()->getUsed()));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(parsedCommandList.begin(), parsedCommandList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin),
|
||||
cmd->getDataDword());
|
||||
originalThreadArbitrationPolicy = cmd->getDataDword();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
commandList->reset();
|
||||
|
||||
{
|
||||
GenCmdList parsedCommandList;
|
||||
ASSERT_TRUE(FamilyType::Parse::parseCommandBuffer(
|
||||
parsedCommandList, ptrOffset(commandList->getCmdContainer().getCommandStream()->getCpuBase(), 0),
|
||||
commandList->getCmdContainer().getCommandStream()->getUsed()));
|
||||
using MI_LOAD_REGISTER_IMM = typename FamilyType::MI_LOAD_REGISTER_IMM;
|
||||
|
||||
auto miLoadImm = findAll<MI_LOAD_REGISTER_IMM *>(parsedCommandList.begin(), parsedCommandList.end());
|
||||
EXPECT_GE(2u, miLoadImm.size());
|
||||
|
||||
uint64_t newThreadArbitrationPolicy = std::numeric_limits<uint64_t>::max();
|
||||
for (auto it : miLoadImm) {
|
||||
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
|
||||
if (cmd->getRegisterOffset() == NEO::DebugControlReg2::address) {
|
||||
EXPECT_EQ(NEO::DebugControlReg2::getRegData(NEO::ThreadArbitrationPolicy::RoundRobin),
|
||||
cmd->getDataDword());
|
||||
newThreadArbitrationPolicy = cmd->getDataDword();
|
||||
EXPECT_EQ(originalThreadArbitrationPolicy, newThreadArbitrationPolicy);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
using CmdlistAppendLaunchKernelTests = Test<ModuleImmutableDataFixture>;
|
||||
struct CmdlistAppendLaunchKernelWithImplicitArgsTests : CmdlistAppendLaunchKernelTests {
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_ICLLP)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_icllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_icllp.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_ICELAKE_LP> enableIcllp;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_ICELAKE_LP;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,7 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_CFL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_cfl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_cfl.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_COFFEELAKE> enableCFL;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_COFFEELAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_KBL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_kbl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_kbl.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_KABYLAKE> enableKBL;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_KABYLAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_SKL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_skl.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_SKYLAKE> enableSKL;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/linux/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_SKYLAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,7 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_ICLLP)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_icllp.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_icllp.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_ICELAKE_LP> enableIcllp;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_ICELAKE_LP;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,7 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
add_subdirectories()
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_CFL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_cfl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_cfl.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_COFFEELAKE> enableCfl;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_COFFEELAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_KBL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_kbl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_kbl.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_KABYLAKE> enableKbl;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_KABYLAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,14 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2024 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_SKL)
|
||||
target_sources(${L0_STATIC_LIB_NAME}
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/enable_sysman_product_helper_skl.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/sysman_product_helper_skl.cpp
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
|
||||
static EnableSysmanProductHelper<IGFX_SKYLAKE> enableSkl;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.h"
|
||||
#include "level_zero/sysman/source/shared/windows/product_helper/sysman_product_helper_hw.inl"
|
||||
|
||||
namespace L0 {
|
||||
namespace Sysman {
|
||||
constexpr static auto gfxProduct = IGFX_SKYLAKE;
|
||||
|
||||
template class SysmanProductHelperHw<gfxProduct>;
|
||||
|
||||
} // namespace Sysman
|
||||
} // namespace L0
|
||||
@@ -42,7 +42,7 @@ components:
|
||||
dest_dir: kernels_bin
|
||||
type: git
|
||||
branch: kernels_bin
|
||||
revision: 3043-2375
|
||||
revision: 3043-2378
|
||||
kmdaf:
|
||||
branch: kmdaf
|
||||
dest_dir: kmdaf
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019-2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_GEN11)
|
||||
add_subdirectories()
|
||||
endif()
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
|
||||
#include "opencl/source/mem_obj/buffer_base.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef Gen11Family Family;
|
||||
static auto gfxCore = IGFX_GEN11_CORE;
|
||||
|
||||
#include "opencl/source/mem_obj/buffer_factory_init.inl"
|
||||
} // namespace NEO
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
|
||||
#include "opencl/source/helpers/cl_gfx_core_helper_base.inl"
|
||||
#include "opencl/source/helpers/cl_gfx_core_helper_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen11Family;
|
||||
static auto gfxCore = IGFX_GEN11_CORE;
|
||||
|
||||
#include "opencl/source/helpers/cl_gfx_core_helper_factory_init.inl"
|
||||
|
||||
template class ClGfxCoreHelperHw<Family>;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
#include "shared/source/memory_manager/unified_memory_manager.h"
|
||||
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/command_queue/command_queue_hw_bdw_and_later.inl"
|
||||
#include "opencl/source/command_queue/enqueue_resource_barrier.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef Gen11Family Family;
|
||||
static auto gfxCore = IGFX_GEN11_CORE;
|
||||
|
||||
template class CommandQueueHw<Family>;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandQueueHw<Family>>() {
|
||||
extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE];
|
||||
commandQueueFactory[gfxCore] = CommandQueueHw<Family>::create;
|
||||
}
|
||||
} // namespace NEO
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/helpers/cl_gfx_core_helper.h"
|
||||
#include "opencl/source/mem_obj/buffer.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/sampler/sampler.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen11Family;
|
||||
|
||||
struct EnableOCLGen11 {
|
||||
EnableOCLGen11() {
|
||||
populateFactoryTable<BufferHw<Family>>();
|
||||
populateFactoryTable<ClGfxCoreHelperHw<Family>>();
|
||||
populateFactoryTable<CommandQueueHw<Family>>();
|
||||
populateFactoryTable<ImageHw<Family>>();
|
||||
populateFactoryTable<SamplerHw<Family>>();
|
||||
}
|
||||
};
|
||||
|
||||
static EnableOCLGen11 enable;
|
||||
} // namespace NEO
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
#include "shared/source/gen11/hw_info.h"
|
||||
|
||||
#include "opencl/source/command_queue/gpgpu_walker_bdw_and_later.inl"
|
||||
#include "opencl/source/command_queue/hardware_interface_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen11Family;
|
||||
|
||||
template class HardwareInterface<Family>;
|
||||
|
||||
template void HardwareInterface<Family>::dispatchWalker<Family::DefaultWalkerType>(CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, const CsrDependencies &csrDependencies, HardwareInterfaceWalkerArgs &walkerArgs);
|
||||
template void HardwareInterface<Family>::programWalker<Family::DefaultWalkerType>(LinearStream &commandStream, Kernel &kernel, CommandQueue &commandQueue, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, const DispatchInfo &dispatchInfo, HardwareInterfaceWalkerArgs &walkerArgs);
|
||||
template void HardwareInterface<Family>::dispatchKernelCommands<Family::DefaultWalkerType>(CommandQueue &commandQueue, const DispatchInfo &dispatchInfo, LinearStream &commandStream, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, HardwareInterfaceWalkerArgs &walkerArgs);
|
||||
template Family::DefaultWalkerType *HardwareInterface<Family>::allocateWalkerSpace<Family::DefaultWalkerType>(LinearStream &commandStream, const Kernel &kernel);
|
||||
|
||||
template class GpgpuWalkerHelper<Family>;
|
||||
template void GpgpuWalkerHelper<Family>::setupTimestampPacket<Family::DefaultWalkerType>(LinearStream *cmdStream, Family::DefaultWalkerType *walkerCmd, TagNodeBase *timestampPacketNode, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
template size_t GpgpuWalkerHelper<Family>::setGpgpuWalkerThreadData<Family::DefaultWalkerType>(Family::DefaultWalkerType *walkerCmd, const KernelDescriptor &kernelDescriptor, const size_t startWorkGroups[3],
|
||||
const size_t numWorkGroups[3], const size_t localWorkSizesIn[3], uint32_t simd, uint32_t workDim, bool localIdsGenerationByRuntime, bool inlineDataProgrammingRequired, uint32_t requiredWorkGroupOrder);
|
||||
|
||||
template struct EnqueueOperation<Family>;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/compiler_interface/external_functions.h"
|
||||
#include "shared/source/gen11/hw_cmds_base.h"
|
||||
#include "shared/source/kernel/implicit_args_helper.h"
|
||||
|
||||
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"
|
||||
#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl"
|
||||
#include "opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl"
|
||||
|
||||
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
|
||||
typedef Gen11Family Family;
|
||||
static const auto gfxFamily = IGFX_GEN11_CORE;
|
||||
|
||||
template <>
|
||||
uint32_t GTPinGfxCoreHelperHw<Family>::getGenVersion() const {
|
||||
return gtpin::GTPIN_GEN_11;
|
||||
}
|
||||
|
||||
template class GTPinGfxCoreHelperHw<Family>;
|
||||
|
||||
struct GTPinEnableGen11 {
|
||||
GTPinEnableGen11() {
|
||||
gtpinGfxCoreHelperFactory[gfxFamily] = GTPinGfxCoreHelperHw<Family>::create;
|
||||
}
|
||||
};
|
||||
|
||||
static GTPinEnableGen11 gtpinEnable;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
|
||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
||||
#include "opencl/source/helpers/hardware_commands_helper_base.inl"
|
||||
#include "opencl/source/helpers/hardware_commands_helper_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
using FamilyType = Gen11Family;
|
||||
} // namespace NEO
|
||||
|
||||
#include "opencl/source/helpers/enable_hardware_commands_helper_gpgpu.inl"
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds_base.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.inl"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen11Family;
|
||||
static auto gfxCore = IGFX_GEN11_CORE;
|
||||
|
||||
template <>
|
||||
void ImageHw<Family>::appendSurfaceStateParams(RENDER_SURFACE_STATE *surfaceState, uint32_t rootDeviceIndex) {
|
||||
if (hasAlphaChannel(&imageFormat)) {
|
||||
surfaceState->setSampleTapDiscardDisable(RENDER_SURFACE_STATE::SAMPLE_TAP_DISCARD_DISABLE_ENABLE);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
// factory initializer
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen11/hw_cmds.h"
|
||||
|
||||
#include "opencl/source/sampler/sampler.h"
|
||||
#include "opencl/source/sampler/sampler.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef Gen11Family Family;
|
||||
static auto gfxCore = IGFX_GEN11_CORE;
|
||||
|
||||
#include "opencl/source/sampler/sampler_factory_init.inl"
|
||||
} // namespace NEO
|
||||
@@ -1,9 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2019-2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
if(SUPPORT_GEN8)
|
||||
add_subdirectories()
|
||||
endif()
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds.h"
|
||||
|
||||
#include "opencl/source/mem_obj/buffer_base.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef Gen8Family Family;
|
||||
static auto gfxCore = IGFX_GEN8_CORE;
|
||||
|
||||
#include "opencl/source/mem_obj/buffer_factory_init.inl"
|
||||
} // namespace NEO
|
||||
@@ -1,23 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds.h"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
|
||||
#include "opencl/source/helpers/cl_gfx_core_helper_base.inl"
|
||||
#include "opencl/source/helpers/cl_gfx_core_helper_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen8Family;
|
||||
static auto gfxCore = IGFX_GEN8_CORE;
|
||||
|
||||
#include "opencl/source/helpers/cl_gfx_core_helper_factory_init.inl"
|
||||
|
||||
template class ClGfxCoreHelperHw<Family>;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,29 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds.h"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
#include "shared/source/memory_manager/unified_memory_manager.h"
|
||||
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/command_queue/command_queue_hw_bdw_and_later.inl"
|
||||
#include "opencl/source/command_queue/enqueue_resource_barrier.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef Gen8Family Family;
|
||||
static auto gfxCore = IGFX_GEN8_CORE;
|
||||
|
||||
template class CommandQueueHw<Family>;
|
||||
|
||||
template <>
|
||||
void populateFactoryTable<CommandQueueHw<Family>>() {
|
||||
extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE];
|
||||
commandQueueFactory[gfxCore] = CommandQueueHw<Family>::create;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds.h"
|
||||
#include "shared/source/helpers/populate_factory.h"
|
||||
|
||||
#include "opencl/source/command_queue/command_queue_hw.h"
|
||||
#include "opencl/source/helpers/cl_gfx_core_helper.h"
|
||||
#include "opencl/source/mem_obj/buffer.h"
|
||||
#include "opencl/source/mem_obj/image.h"
|
||||
#include "opencl/source/sampler/sampler.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen8Family;
|
||||
|
||||
struct EnableOCLGen8 {
|
||||
EnableOCLGen8() {
|
||||
populateFactoryTable<BufferHw<Family>>();
|
||||
populateFactoryTable<ClGfxCoreHelperHw<Family>>();
|
||||
populateFactoryTable<CommandQueueHw<Family>>();
|
||||
populateFactoryTable<ImageHw<Family>>();
|
||||
populateFactoryTable<SamplerHw<Family>>();
|
||||
}
|
||||
};
|
||||
|
||||
static EnableOCLGen8 enable;
|
||||
} // namespace NEO
|
||||
@@ -1,73 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds.h"
|
||||
#include "shared/source/gen8/hw_info.h"
|
||||
|
||||
#include "opencl/source/command_queue/gpgpu_walker_bdw_and_later.inl"
|
||||
#include "opencl/source/command_queue/hardware_interface_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen8Family;
|
||||
|
||||
template <>
|
||||
void GpgpuWalkerHelper<Family>::applyWADisableLSQCROPERFforOCL(NEO::LinearStream *pCommandStream, const Kernel &kernel, bool disablePerfMode) {
|
||||
if (disablePerfMode) {
|
||||
if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) {
|
||||
// Set bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4
|
||||
GpgpuWalkerHelper<Family>::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeOr, RegisterConstants::l3SqcBitLqscR0PerfDis);
|
||||
}
|
||||
} else {
|
||||
if (kernel.getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) {
|
||||
// Add PIPE_CONTROL with CS_Stall to wait till GPU finishes its work
|
||||
typedef typename Family::PIPE_CONTROL PIPE_CONTROL;
|
||||
auto pipeControlSpace = reinterpret_cast<PIPE_CONTROL *>(pCommandStream->getSpace(sizeof(PIPE_CONTROL)));
|
||||
auto pipeControl = Family::cmdInitPipeControl;
|
||||
pipeControl.setCommandStreamerStallEnable(true);
|
||||
*pipeControlSpace = pipeControl;
|
||||
// Clear bit L3SQC_BIT_LQSC_RO_PERF_DIS in L3SQC_REG4
|
||||
GpgpuWalkerHelper<Family>::addAluReadModifyWriteRegister(pCommandStream, RegisterOffsets::l3sqcReg4, AluRegisters::opcodeAnd, ~RegisterConstants::l3SqcBitLqscR0PerfDis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
template <>
|
||||
size_t GpgpuWalkerHelper<Family>::getSizeForWADisableLSQCROPERFforOCL(const Kernel *pKernel) {
|
||||
typedef typename Family::MI_LOAD_REGISTER_REG MI_LOAD_REGISTER_REG;
|
||||
typedef typename Family::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
|
||||
typedef typename Family::PIPE_CONTROL PIPE_CONTROL;
|
||||
typedef typename Family::MI_MATH MI_MATH;
|
||||
typedef typename Family::MI_MATH_ALU_INST_INLINE MI_MATH_ALU_INST_INLINE;
|
||||
size_t n = 0;
|
||||
if (pKernel->getKernelInfo().kernelDescriptor.kernelAttributes.flags.usesFencesForReadWriteImages) {
|
||||
n += sizeof(PIPE_CONTROL) +
|
||||
(2 * sizeof(MI_LOAD_REGISTER_REG) +
|
||||
sizeof(MI_LOAD_REGISTER_IMM) +
|
||||
sizeof(PIPE_CONTROL) +
|
||||
sizeof(MI_MATH) +
|
||||
RegisterConstants::numAluInstForReadModifyWrite * sizeof(MI_MATH_ALU_INST_INLINE)) *
|
||||
2; // For 2 WADisableLSQCROPERFforOCL WAs
|
||||
}
|
||||
return n;
|
||||
}
|
||||
|
||||
template class HardwareInterface<Family>;
|
||||
|
||||
template void HardwareInterface<Family>::dispatchWalker<Family::DefaultWalkerType>(CommandQueue &commandQueue, const MultiDispatchInfo &multiDispatchInfo, const CsrDependencies &csrDependencies, HardwareInterfaceWalkerArgs &walkerArgs);
|
||||
template void HardwareInterface<Family>::programWalker<Family::DefaultWalkerType>(LinearStream &commandStream, Kernel &kernel, CommandQueue &commandQueue, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, const DispatchInfo &dispatchInfo, HardwareInterfaceWalkerArgs &walkerArgs);
|
||||
template void HardwareInterface<Family>::dispatchKernelCommands<Family::DefaultWalkerType>(CommandQueue &commandQueue, const DispatchInfo &dispatchInfo, LinearStream &commandStream, IndirectHeap &dsh, IndirectHeap &ioh, IndirectHeap &ssh, HardwareInterfaceWalkerArgs &walkerArgs);
|
||||
template Family::DefaultWalkerType *HardwareInterface<Family>::allocateWalkerSpace<Family::DefaultWalkerType>(LinearStream &commandStream, const Kernel &kernel);
|
||||
|
||||
template class GpgpuWalkerHelper<Family>;
|
||||
template void GpgpuWalkerHelper<Family>::setupTimestampPacket<Family::DefaultWalkerType>(LinearStream *cmdStream, Family::DefaultWalkerType *walkerCmd, TagNodeBase *timestampPacketNode, const RootDeviceEnvironment &rootDeviceEnvironment);
|
||||
template size_t GpgpuWalkerHelper<Family>::setGpgpuWalkerThreadData<Family::DefaultWalkerType>(Family::DefaultWalkerType *walkerCmd, const KernelDescriptor &kernelDescriptor, const size_t startWorkGroups[3],
|
||||
const size_t numWorkGroups[3], const size_t localWorkSizesIn[3], uint32_t simd, uint32_t workDim, bool localIdsGenerationByRuntime, bool inlineDataProgrammingRequired, uint32_t requiredWorkGroupOrder);
|
||||
|
||||
template struct EnqueueOperation<Family>;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,40 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/compiler_interface/external_functions.h"
|
||||
#include "shared/source/gen8/hw_cmds_base.h"
|
||||
#include "shared/source/kernel/implicit_args_helper.h"
|
||||
|
||||
#include "opencl/source/gtpin/gtpin_gfx_core_helper.h"
|
||||
#include "opencl/source/gtpin/gtpin_gfx_core_helper.inl"
|
||||
#include "opencl/source/gtpin/gtpin_gfx_core_helper_bdw_and_later.inl"
|
||||
|
||||
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
extern GTPinGfxCoreHelperCreateFunctionType gtpinGfxCoreHelperFactory[IGFX_MAX_CORE];
|
||||
|
||||
typedef Gen8Family Family;
|
||||
static const auto gfxFamily = IGFX_GEN8_CORE;
|
||||
|
||||
template <>
|
||||
uint32_t GTPinGfxCoreHelperHw<Family>::getGenVersion() const {
|
||||
return gtpin::GTPIN_GEN_8;
|
||||
}
|
||||
|
||||
template class GTPinGfxCoreHelperHw<Family>;
|
||||
|
||||
struct GTPinEnableGen8 {
|
||||
GTPinEnableGen8() {
|
||||
gtpinGfxCoreHelperFactory[gfxFamily] = GTPinGfxCoreHelperHw<Family>::create;
|
||||
}
|
||||
};
|
||||
|
||||
static GTPinEnableGen8 gtpinEnable;
|
||||
|
||||
} // namespace NEO
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds.h"
|
||||
|
||||
#include "opencl/source/helpers/hardware_commands_helper.h"
|
||||
#include "opencl/source/helpers/hardware_commands_helper_base.inl"
|
||||
#include "opencl/source/helpers/hardware_commands_helper_bdw_and_later.inl"
|
||||
|
||||
namespace NEO {
|
||||
using FamilyType = Gen8Family;
|
||||
} // namespace NEO
|
||||
|
||||
#include "opencl/source/helpers/enable_hardware_commands_helper_gpgpu.inl"
|
||||
@@ -1,28 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds_base.h"
|
||||
|
||||
#include "opencl/source/mem_obj/image.inl"
|
||||
|
||||
#include <map>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
using Family = Gen8Family;
|
||||
static auto gfxCore = IGFX_GEN8_CORE;
|
||||
|
||||
template <>
|
||||
void ImageHw<Family>::setMediaSurfaceRotation(void *) {}
|
||||
|
||||
template <>
|
||||
void ImageHw<Family>::setSurfaceMemoryObjectControlState(void *, uint32_t) {}
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
// factory initializer
|
||||
#include "opencl/source/mem_obj/image_factory_init.inl"
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/gen8/hw_cmds.h"
|
||||
|
||||
#include "opencl/source/sampler/sampler.h"
|
||||
#include "opencl/source/sampler/sampler.inl"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
typedef Gen8Family Family;
|
||||
static auto gfxCore = IGFX_GEN8_CORE;
|
||||
|
||||
#include "opencl/source/sampler/sampler_factory_init.inl"
|
||||
} // namespace NEO
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user