removing unused code

Change-Id: I4be71baeedfa96fd98f611ebc58097b1cec2cd75
Signed-off-by: Artur Harasimiuk <artur.harasimiuk@intel.com>
This commit is contained in:
Artur Harasimiuk 2019-06-04 21:18:03 +02:00 committed by sys_ocldev
parent 71a4c0c954
commit 1bc98b8478
89 changed files with 2 additions and 9424 deletions

View File

@ -10,7 +10,6 @@ set(ALL_GEN_TYPES "")
list(APPEND ALL_GEN_TYPES "GEN8")
list(APPEND ALL_GEN_TYPES "GEN9")
list(APPEND ALL_GEN_TYPES "GEN10")
list(APPEND ALL_GEN_TYPES "GEN11")
set(ALL_GEN_TYPES_REVERSED ${ALL_GEN_TYPES})
@ -161,9 +160,6 @@ endmacro()
SET_FLAGS_FOR("GEN8" "BDW")
SET_FLAGS_FOR("GEN9" "SKL" "KBL" "BXT" "GLK" "CFL")
if(SUPPORT_GEN10)
SET_FLAGS_FOR("GEN10" "CNL")
endif()
SET_FLAGS_FOR("GEN11" "ICLLP" "LKF")
# Init lists
@ -248,19 +244,6 @@ if(SUPPORT_GEN9)
endif()
endif()
if(SUPPORT_GEN10)
ADD_PLATFORM_FOR_GEN("SUPPORTED" "GEN10" "CNL" "CORE")
ADD_PLATFORM_FOR_GEN("SUPPORTED_2_0" "GEN10" "CNL" "CORE")
if(TESTS_GEN10)
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN10" "CNLFamily")
ADD_ITEM_FOR_GEN("PLATFORMS" "TESTED" "GEN10" "CNL")
ADD_ITEM_FOR_GEN("PLATFORMS" "TESTED_APPVERIFIER" "GEN10" "CNL")
ADD_ITEM_FOR_GEN("CONFIGURATIONS" "AUB_TESTS" "GEN10" "cnl/2/5/8")
ADD_ITEM_FOR_GEN("CONFIGURATIONS" "MT_TESTS" "GEN10" "cnl/2/5/8")
ADD_ITEM_FOR_GEN("CONFIGURATIONS" "UNIT_TESTS" "GEN10" "cnl/2/5/8")
endif()
endif()
if(SUPPORT_GEN11)
if(TESTS_GEN11)
ADD_ITEM_FOR_GEN("FAMILY_NAME" "TESTED" "GEN11" "ICLFamily")

View File

@ -1,92 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/builtin_kernels_simulation/scheduler_simulation.h"
#include "runtime/builtin_kernels_simulation/opencl_c.h"
#include "runtime/builtin_kernels_simulation/scheduler_simulation.inl"
#include "runtime/execution_model/device_enqueue.h"
#include "runtime/gen10/hw_cmds.h"
#include "runtime/memory_manager/graphics_allocation.h"
#include "CL/cl.h"
using namespace NEO;
using namespace BuiltinKernelsSimulation;
namespace Gen10SchedulerSimulation {
#define SCHEDULER_EMULATION
uint GetNextPowerof2(uint number);
float __intel__getProfilingTimerResolution() {
return static_cast<float>(DEFAULT_GEN10_PLATFORM::hwInfo.capabilityTable.defaultProfilingTimerResolution);
}
#include "runtime/gen10/device_enqueue.h"
#include "runtime/gen10/scheduler_definitions.h"
#include "runtime/gen10/scheduler_igdrcl_built_in.inl"
#include "runtime/scheduler/scheduler.cl"
} // namespace Gen10SchedulerSimulation
namespace BuiltinKernelsSimulation {
template <>
void SchedulerSimulation<CNLFamily>::startScheduler(uint32_t index,
GraphicsAllocation *queue,
GraphicsAllocation *commandsStack,
GraphicsAllocation *eventsPool,
GraphicsAllocation *secondaryBatchBuffer,
GraphicsAllocation *dsh,
GraphicsAllocation *reflectionSurface,
GraphicsAllocation *queueStorageBuffer,
GraphicsAllocation *ssh,
GraphicsAllocation *debugQueue) {
threadIDToLocalIDmap.insert(std::make_pair(std::this_thread::get_id(), index));
while (!conditionReady) {
}
Gen10SchedulerSimulation::SchedulerParallel20((IGIL_CommandQueue *)queue->getUnderlyingBuffer(),
(uint *)commandsStack->getUnderlyingBuffer(),
(IGIL_EventPool *)eventsPool->getUnderlyingBuffer(),
(uint *)secondaryBatchBuffer->getUnderlyingBuffer(),
(char *)dsh->getUnderlyingBuffer(),
(IGIL_KernelDataHeader *)reflectionSurface->getUnderlyingBuffer(),
(uint *)queueStorageBuffer->getUnderlyingBuffer(),
(char *)ssh->getUnderlyingBuffer(),
debugQueue != nullptr ? (DebugDataBuffer *)debugQueue->getUnderlyingBuffer() : nullptr);
}
template <>
void SchedulerSimulation<CNLFamily>::patchGpGpuWalker(uint secondLevelBatchOffset,
__global uint *secondaryBatchBuffer,
uint interfaceDescriptorOffset,
uint simdSize,
uint totalLocalWorkSize,
uint3 dimSize,
uint3 startPoint,
uint numberOfHwThreadsPerWg,
uint indirectPayloadSize,
uint ioHoffset) {
Gen10SchedulerSimulation::patchGpGpuWalker(secondLevelBatchOffset,
secondaryBatchBuffer,
interfaceDescriptorOffset,
simdSize,
totalLocalWorkSize,
dimSize,
startPoint,
numberOfHwThreadsPerWg,
indirectPayloadSize,
ioHoffset);
}
template class SchedulerSimulation<CNLFamily>;
} // namespace BuiltinKernelsSimulation

View File

@ -28,32 +28,6 @@ DEVICE( ILKF_1x8x8_DESK_DEVICE_F0_ID, LKF_1x8x8, GTTYPE_GT1 )
#endif
#endif
#ifdef SUPPORT_GEN10
DEVICE( ICNL_5x8_DESK_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
DEVICE( ICNL_5x8_DESKTOP_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
DEVICE( ICNL_5x8_HALO_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
DEVICE( ICNL_5x8_SUPERSKU_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
DEVICE( ICNL_5x8_ULX_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
DEVICE( ICNL_5x8_ULT_DEVICE_F0_ID, CNL_2x5x8, GTTYPE_GT2 )
DEVICE( ICNL_4x8_ULT_DEVICE_F0_ID, CNL_2x4x8, GTTYPE_GT2 )
DEVICE( ICNL_4x8_ULX_DEVICE_F0_ID, CNL_2x4x8, GTTYPE_GT2 )
DEVICE( ICNL_4x8_HALO_DEVICE_F0_ID, CNL_2x4x8, GTTYPE_GT2 )
DEVICE( ICNL_3x8_DESK_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
DEVICE( ICNL_3x8_ULT_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
DEVICE( ICNL_2x8_ULT_DEVICE_F0_ID , CNL_1x2x8, GTTYPE_GT1 )
DEVICE( ICNL_3x8_HALO_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
DEVICE( ICNL_3x8_DESKTOP_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
DEVICE( ICNL_3x8_ULX_DEVICE_F0_ID, CNL_1x3x8, GTTYPE_GT1 )
DEVICE( ICNL_2x8_ULX_DEVICE_F0_ID, CNL_1x2x8, GTTYPE_GT1 )
DEVICE( ICNL_2x8_HALO_DEVICE_F0_ID, CNL_1x2x8, GTTYPE_GT1 )
DEVICE( ICNL_9x8_DESK_DEVICE_F0_ID, CNL_4x9x8, GTTYPE_GT3 )
DEVICE( ICNL_9x8_ULT_DEVICE_F0_ID, CNL_4x9x8, GTTYPE_GT3 )
DEVICE( ICNL_9x8_SUPERSKU_DEVICE_F0_ID, CNL_4x9x8, GTTYPE_GT3 )
#endif
#ifdef SUPPORT_GEN9
#ifdef SUPPORT_SKL
// GT1

View File

@ -1,26 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/aub_command_stream_receiver_hw.h"
#include "runtime/command_stream/aub_command_stream_receiver_hw_bdw_plus.inl"
#include "runtime/helpers/array_count.h"
#include "runtime/helpers/base_object.h"
namespace NEO {
typedef CNLFamily Family;
static auto gfxCore = IGFX_GEN10_CORE;
template <>
void populateFactoryTable<AUBCommandStreamReceiverHw<Family>>() {
extern AubCommandStreamReceiverCreateFunc aubCommandStreamReceiverFactory[IGFX_MAX_CORE];
UNRECOVERABLE_IF(!isInRange(gfxCore, aubCommandStreamReceiverFactory));
aubCommandStreamReceiverFactory[gfxCore] = AUBCommandStreamReceiverHw<Family>::create;
}
template class AUBCommandStreamReceiverHw<Family>;
} // namespace NEO

View File

@ -1,30 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/gen_common/aub_mapper_base.h"
#include "runtime/memory_manager/memory_constants.h"
#include "engine_node.h"
namespace NEO {
struct CNLFamily;
template <>
struct AUBFamilyMapper<CNLFamily> {
enum { device = AubMemDump::DeviceValues::Cnl };
using AubTraits = AubMemDump::Traits<device, MemoryConstants::GfxAddressBits>;
static const AubMemDump::LrcaHelper *const csTraits[aub_stream::NUM_ENGINES];
static const MMIOList globalMMIO;
static const MMIOList *perEngineMMIO[aub_stream::NUM_ENGINES];
typedef AubMemDump::AubDump<AubTraits> AUB;
};
} // namespace NEO

View File

@ -1,99 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/aub_mem_dump/aub_alloc_dump.inl"
#include "runtime/aub_mem_dump/aub_mem_dump.inl"
#include "runtime/helpers/completion_stamp.h"
#include "runtime/helpers/hw_helper.h"
#include "aub_mapper.h"
#include "config.h"
namespace AubMemDump {
enum {
device = DeviceValues::Cnl
};
// Instantiate these common template implementations.
template struct AubDump<Traits<device, 32>>;
template struct AubDump<Traits<device, 48>>;
template struct AubPageTableHelper32<Traits<device, 32>>;
template struct AubPageTableHelper64<Traits<device, 48>>;
} // namespace AubMemDump
namespace NEO {
using Family = CNLFamily;
static const AubMemDump::LrcaHelperRcs rcs(0x002000);
static const AubMemDump::LrcaHelperBcs bcs(0x022000);
static const AubMemDump::LrcaHelperVcs vcs(0x012000);
static const AubMemDump::LrcaHelperVecs vecs(0x01a000);
const AubMemDump::LrcaHelper *const AUBFamilyMapper<Family>::csTraits[aub_stream::NUM_ENGINES] = {
&rcs,
&bcs,
&vcs,
&vecs};
const MMIOList AUBFamilyMapper<Family>::globalMMIO;
static const MMIOList mmioListRCS = {
MMIOPair(0x000020d8, 0x00020000),
MMIOPair(AubMemDump::computeRegisterOffset(rcs.mmioBase, 0x229c), 0xffff8280),
MMIOPair(0x0000C800, 0x00000009),
MMIOPair(0x0000C804, 0x00000038),
MMIOPair(0x0000C808, 0x0000003B),
MMIOPair(0x0000C80C, 0x00000039),
MMIOPair(0x0000C810, 0x00000037),
MMIOPair(0x0000C814, 0x00000039),
MMIOPair(0x0000C818, 0x00000037),
MMIOPair(0x0000C81C, 0x0000001B),
MMIOPair(0x0000C820, 0x00060037),
MMIOPair(0x0000C824, 0x00000032),
MMIOPair(0x0000C828, 0x00000033),
MMIOPair(0x0000C82C, 0x0000003B),
MMIOPair(0x0000C8C0, 0x00000037),
};
static const MMIOList mmioListBCS = {
MMIOPair(AubMemDump::computeRegisterOffset(bcs.mmioBase, 0x229c), 0xffff8280),
};
static const MMIOList mmioListVCS = {
MMIOPair(AubMemDump::computeRegisterOffset(vcs.mmioBase, 0x229c), 0xffff8280),
};
static const MMIOList mmioListVECS = {
MMIOPair(AubMemDump::computeRegisterOffset(vecs.mmioBase, 0x229c), 0xffff8280),
};
const MMIOList *AUBFamilyMapper<Family>::perEngineMMIO[aub_stream::NUM_ENGINES] = {
&mmioListRCS,
&mmioListBCS,
&mmioListVCS,
&mmioListVECS};
} // namespace NEO
namespace AubAllocDump {
using namespace NEO;
template SurfaceInfo *getDumpSurfaceInfo<Family>(GraphicsAllocation &gfxAllocation, DumpFormat dumpFormat);
template uint32_t getImageSurfaceTypeFromGmmResourceType<Family>(GMM_RESOURCE_TYPE gmmResourceType);
template void dumpBufferInBinFormat<Family>(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
template void dumpImageInBmpFormat<Family>(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
template void dumpBufferInTreFormat<Family>(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
template void dumpImageInTreFormat<Family>(GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
template void dumpAllocation<Family>(DumpFormat dumpFormat, GraphicsAllocation &gfxAllocation, AubMemDump::AubFileStream *stream, uint32_t context);
} // namespace AubAllocDump

View File

@ -1,18 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/mem_obj/buffer_bdw_plus.inl"
#include "hw_cmds.h"
namespace NEO {
typedef CNLFamily Family;
static auto gfxCore = IGFX_GEN10_CORE;
#include "runtime/mem_obj/buffer_factory_init.inl"
} // namespace NEO

View File

@ -1,25 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_queue/command_queue_hw.h"
#include "runtime/command_queue/command_queue_hw_bdw_plus.inl"
#include "runtime/command_queue/enqueue_resource_barrier.h"
#include "runtime/memory_manager/svm_memory_manager.h"
namespace NEO {
typedef CNLFamily Family;
static auto gfxCore = IGFX_GEN10_CORE;
template class CommandQueueHw<Family>;
template <>
void populateFactoryTable<CommandQueueHw<Family>>() {
extern CommandQueueCreateFunc commandQueueFactory[IGFX_MAX_CORE];
commandQueueFactory[gfxCore] = CommandQueueHw<Family>::create;
}
} // namespace NEO

View File

@ -1,74 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/command_stream_receiver_hw_bdw_plus.inl"
#include "runtime/command_stream/device_command_stream.h"
#include "runtime/helpers/blit_commands_helper_bdw_plus.inl"
#include "hw_cmds.h"
#include "hw_info.h"
#include "reg_configs_common.h"
namespace NEO {
typedef CNLFamily Family;
static auto gfxCore = IGFX_GEN10_CORE;
template <>
size_t CommandStreamReceiverHw<Family>::getCmdSizeForComputeMode() {
if (csrSizeRequestFlags.coherencyRequestChanged) {
return sizeof(typename Family::MI_LOAD_REGISTER_IMM);
}
return 0;
}
template <>
void CommandStreamReceiverHw<Family>::programComputeMode(LinearStream &stream, DispatchFlags &dispatchFlags) {
if (csrSizeRequestFlags.coherencyRequestChanged) {
LriHelper<Family>::program(&stream, gen10HdcModeRegisterAddresss, DwordBuilder::build(4, true, !dispatchFlags.requiresCoherency));
this->lastSentCoherencyRequest = static_cast<int8_t>(dispatchFlags.requiresCoherency);
}
}
template <>
void populateFactoryTable<CommandStreamReceiverHw<Family>>() {
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
commandStreamReceiverFactory[gfxCore] = DeviceCommandStreamReceiver<Family>::create;
}
template class CommandStreamReceiverHw<Family>;
template struct BlitCommandsHelper<Family>;
const Family::GPGPU_WALKER Family::cmdInitGpgpuWalker = Family::GPGPU_WALKER::sInit();
const Family::INTERFACE_DESCRIPTOR_DATA Family::cmdInitInterfaceDescriptorData = Family::INTERFACE_DESCRIPTOR_DATA::sInit();
const Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD Family::cmdInitMediaInterfaceDescriptorLoad = Family::MEDIA_INTERFACE_DESCRIPTOR_LOAD::sInit();
const Family::MEDIA_STATE_FLUSH Family::cmdInitMediaStateFlush = Family::MEDIA_STATE_FLUSH::sInit();
const Family::MI_BATCH_BUFFER_START Family::cmdInitBatchBufferStart = Family::MI_BATCH_BUFFER_START::sInit();
const Family::MI_BATCH_BUFFER_END Family::cmdInitBatchBufferEnd = Family::MI_BATCH_BUFFER_END::sInit();
const Family::PIPE_CONTROL Family::cmdInitPipeControl = Family::PIPE_CONTROL::sInit();
const Family::MI_SEMAPHORE_WAIT Family::cmdInitMiSemaphoreWait = Family::MI_SEMAPHORE_WAIT::sInit();
const Family::RENDER_SURFACE_STATE Family::cmdInitRenderSurfaceState = Family::RENDER_SURFACE_STATE::sInit();
const Family::MI_LOAD_REGISTER_IMM Family::cmdInitLoadRegisterImm = Family::MI_LOAD_REGISTER_IMM::sInit();
const Family::MI_LOAD_REGISTER_REG Family::cmdInitLoadRegisterReg = Family::MI_LOAD_REGISTER_REG::sInit();
const Family::MI_LOAD_REGISTER_MEM Family::cmdInitLoadRegisterMem = Family::MI_LOAD_REGISTER_MEM::sInit();
const Family::MI_STORE_DATA_IMM Family::cmdInitStoreDataImm = Family::MI_STORE_DATA_IMM::sInit();
const Family::MI_STORE_REGISTER_MEM Family::cmdInitStoreRegisterMem = Family::MI_STORE_REGISTER_MEM::sInit();
const Family::MI_NOOP Family::cmdInitNoop = Family::MI_NOOP::sInit();
const Family::MI_REPORT_PERF_COUNT Family::cmdInitReportPerfCount = Family::MI_REPORT_PERF_COUNT::sInit();
const Family::MI_ATOMIC Family::cmdInitAtomic = Family::MI_ATOMIC::sInit();
const Family::PIPELINE_SELECT Family::cmdInitPipelineSelect = Family::PIPELINE_SELECT::sInit();
const Family::MI_ARB_CHECK Family::cmdInitArbCheck = Family::MI_ARB_CHECK::sInit();
const Family::MEDIA_VFE_STATE Family::cmdInitMediaVfeState = Family::MEDIA_VFE_STATE::sInit();
const Family::STATE_BASE_ADDRESS Family::cmdInitStateBaseAddress = Family::STATE_BASE_ADDRESS::sInit();
const Family::MEDIA_SURFACE_STATE Family::cmdInitMediaSurfaceState = Family::MEDIA_SURFACE_STATE::sInit();
const Family::SAMPLER_STATE Family::cmdInitSamplerState = Family::SAMPLER_STATE::sInit();
const Family::GPGPU_CSR_BASE_ADDRESS Family::cmdInitGpgpuCsrBaseAddress = Family::GPGPU_CSR_BASE_ADDRESS::sInit();
const Family::STATE_SIP Family::cmdInitStateSip = Family::STATE_SIP::sInit();
const Family::BINDING_TABLE_STATE Family::cmdInitBindingTableState = Family::BINDING_TABLE_STATE::sInit();
const Family::MI_USER_INTERRUPT Family::cmdInitUserInterrupt = Family::MI_USER_INTERRUPT::sInit();
const Family::XY_SRC_COPY_BLT Family::cmdInitXyCopyBlt = Family::XY_SRC_COPY_BLT::sInit();
const Family::MI_FLUSH_DW Family::cmdInitMiFlushDw = Family::MI_FLUSH_DW::sInit();
} // namespace NEO

View File

@ -1,14 +0,0 @@
/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/command_stream_receiver_simulated_common_hw_bdw_plus.inl"
namespace NEO {
typedef CNLFamily Family;
template class CommandStreamReceiverSimulatedCommonHw<Family>;
} // namespace NEO

View File

@ -1,23 +0,0 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "../execution_model/device_enqueue.h"
// Uncomment this macro to build "empty" schedulers
//#define WA_DISABLE_SCHEDULERS 1
#define OCLRT_GPGPU_WALKER_CMD_DEVICE_CMD_G10 (15 * sizeof(uint))
#define OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G10 (6 * sizeof(uint))
#define OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G10_DWORD_OFFSET (6)
#define OCLRT_GPGPU_WALKER_CMD_DEVICE_CMD_G10_DWORD_OFFSET (15)
#define CS_PREFETCH_SIZE_G10_WA 100
#define SECOND_LEVEL_BUFFER_SPACE_FOR_EACH_ENQUEUE_GEN10 (OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_SIZEOF_MEDIA_INTERFACE_DESCRIPTOR_LOAD_DEVICE_CMD + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G10 + OCLRT_GPGPU_WALKER_CMD_DEVICE_CMD_G10 + OCLRT_SIZEOF_MEDIA_STATE_FLUSH + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G10 + CS_PREFETCH_SIZE + CS_PREFETCH_SIZE_G10_WA)
#define SECOND_LEVEL_BUFFER_NUMBER_OF_ENQUEUES_GEN10 (128)

View File

@ -1,46 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/device_queue/device_queue_hw.h"
#include "runtime/device_queue/device_queue_hw_bdw_plus.inl"
#include "runtime/device_queue/device_queue_hw_profiling.inl"
#include "runtime/gen10/hw_cmds.h"
namespace NEO {
typedef CNLFamily Family;
static auto gfxCore = IGFX_GEN10_CORE;
static const size_t csPrefetchSizeWA = 100;
template <>
size_t DeviceQueueHw<Family>::getCSPrefetchSize() {
return 512 + csPrefetchSizeWA;
}
template <>
void populateFactoryTable<DeviceQueueHw<Family>>() {
extern DeviceQueueCreateFunc deviceQueueFactory[IGFX_MAX_CORE];
deviceQueueFactory[gfxCore] = DeviceQueueHw<Family>::create;
}
template <>
size_t DeviceQueueHw<Family>::getWaCommandsSize() { return 0; }
template <>
void DeviceQueueHw<Family>::addArbCheckCmdWa() {}
template <>
void DeviceQueueHw<Family>::addMiAtomicCmdWa(uint64_t atomicOpPlaceholder) {}
template <>
void DeviceQueueHw<Family>::addLriCmdWa(bool setArbCheck) {}
template <>
void DeviceQueueHw<Family>::addPipeControlCmdWa(bool isNoopCmd) {}
template class DeviceQueueHw<Family>;
} // namespace NEO

View File

@ -1,45 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_queue/command_queue_hw.h"
#include "runtime/command_stream/aub_command_stream_receiver_hw.h"
#include "runtime/command_stream/command_stream_receiver_hw.h"
#include "runtime/command_stream/tbx_command_stream_receiver_hw.h"
#include "runtime/device_queue/device_queue_hw.h"
#include "hw_cmds.h"
#ifdef HAVE_INSTRUMENTATION
#include "runtime/event/perf_counter.h"
#endif
#include "runtime/helpers/hw_helper.h"
#include "runtime/mem_obj/buffer.h"
#include "runtime/mem_obj/image.h"
#include "runtime/sampler/sampler.h"
namespace NEO {
extern HwHelper *hwHelperFactory[IGFX_MAX_CORE];
typedef CNLFamily Family;
static auto gfxFamily = IGFX_GEN10_CORE;
struct EnableGen10 {
EnableGen10() {
populateFactoryTable<AUBCommandStreamReceiverHw<Family>>();
populateFactoryTable<TbxCommandStreamReceiverHw<Family>>();
populateFactoryTable<CommandQueueHw<Family>>();
populateFactoryTable<DeviceQueueHw<Family>>();
populateFactoryTable<CommandStreamReceiverHw<Family>>();
populateFactoryTable<BufferHw<Family>>();
populateFactoryTable<ImageHw<Family>>();
populateFactoryTable<SamplerHw<Family>>();
hwHelperFactory[gfxFamily] = &HwHelperHw<Family>::get();
}
};
static EnableGen10 enable;
} // namespace NEO

View File

@ -1,19 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/enable_product.inl"
#include "runtime/os_interface/hw_info_config.h"
#include "hw_cmds.h"
namespace NEO {
#ifdef SUPPORT_CNL
static EnableGfxProductHw<IGFX_CANNONLAKE> enableGfxProductHwCNL;
#endif
} // namespace NEO

View File

@ -1,18 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/os_interface/hw_info_config.h"
#include "hw_cmds.h"
namespace NEO {
#ifdef SUPPORT_CNL
static EnableProductHwInfoConfig<IGFX_CANNONLAKE> enableCNL;
#endif
} // namespace NEO

View File

@ -1,26 +0,0 @@
/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/experimental_command_buffer.h"
#include "runtime/command_stream/experimental_command_buffer.inl"
#include "runtime/helpers/hw_helper.h"
namespace NEO {
typedef CNLFamily GfxFamily;
template void ExperimentalCommandBuffer::injectBufferStart<GfxFamily>(LinearStream &parentStream, size_t cmdBufferOffset);
template size_t ExperimentalCommandBuffer::getRequiredInjectionSize<GfxFamily>() noexcept;
template size_t ExperimentalCommandBuffer::programExperimentalCommandBuffer<GfxFamily>();
template size_t ExperimentalCommandBuffer::getTotalExperimentalSize<GfxFamily>() noexcept;
template void ExperimentalCommandBuffer::addTimeStampPipeControl<GfxFamily>();
template size_t ExperimentalCommandBuffer::getTimeStampPipeControlSize<GfxFamily>() noexcept;
template void ExperimentalCommandBuffer::addExperimentalCommands<GfxFamily>();
template size_t ExperimentalCommandBuffer::getExperimentalCommandsSize<GfxFamily>() noexcept;
} // namespace NEO

View File

@ -1,20 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_queue/gpgpu_walker_bdw_plus.inl"
#include "runtime/command_queue/hardware_interface_bdw_plus.inl"
#include "runtime/gen10/hw_info.h"
namespace NEO {
template class HardwareInterface<CNLFamily>;
template class GpgpuWalkerHelper<CNLFamily>;
template struct EnqueueOperation<CNLFamily>;
} // namespace NEO

View File

@ -1,35 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/gtpin/gtpin_hw_helper.h"
#include "runtime/gtpin/gtpin_hw_helper.inl"
#include "ocl_igc_shared/gtpin/gtpin_ocl_interface.h"
namespace NEO {
extern GTPinHwHelper *gtpinHwHelperFactory[IGFX_MAX_CORE];
typedef CNLFamily Family;
static const auto gfxFamily = IGFX_GEN10_CORE;
template <>
uint32_t GTPinHwHelperHw<Family>::getGenVersion() {
return gtpin::GTPIN_GEN_10;
}
template class GTPinHwHelperHw<Family>;
struct GTPinEnableGen10 {
GTPinEnableGen10() {
gtpinHwHelperFactory[gfxFamily] = &GTPinHwHelperHw<Family>::get();
}
};
static GTPinEnableGen10 gtpinEnable;
} // namespace NEO

View File

@ -1,121 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/commands/bxml_generator_glue.h"
#include "runtime/helpers/debug_helpers.h"
#include "hw_info.h"
#include "igfxfmid.h"
#include <cstddef>
#define TILERESOURCE_CHICKENBIT_VECTOR_ADDRESS 0x4DFC
#define TILERESOURCE_CHICKENBIT_VECTOR_BITMASK (1UL << 8)
template <class T>
struct CmdParse;
namespace NEO {
struct GEN10 {
#include "runtime/gen10/hw_cmds_generated.h"
#include "runtime/gen10/hw_cmds_generated_patched.h"
};
struct CNLFamily : public GEN10 {
using PARSE = CmdParse<CNLFamily>;
using GfxFamily = CNLFamily;
using WALKER_TYPE = GPGPU_WALKER;
using XY_COPY_BLT = typename GfxFamily::XY_SRC_COPY_BLT;
using MI_STORE_REGISTER_MEM_CMD = typename GfxFamily::MI_STORE_REGISTER_MEM;
static const GPGPU_WALKER cmdInitGpgpuWalker;
static const INTERFACE_DESCRIPTOR_DATA cmdInitInterfaceDescriptorData;
static const MEDIA_INTERFACE_DESCRIPTOR_LOAD cmdInitMediaInterfaceDescriptorLoad;
static const MEDIA_STATE_FLUSH cmdInitMediaStateFlush;
static const MI_BATCH_BUFFER_END cmdInitBatchBufferEnd;
static const MI_BATCH_BUFFER_START cmdInitBatchBufferStart;
static const PIPE_CONTROL cmdInitPipeControl;
static const MI_SEMAPHORE_WAIT cmdInitMiSemaphoreWait;
static const RENDER_SURFACE_STATE cmdInitRenderSurfaceState;
static const MI_LOAD_REGISTER_IMM cmdInitLoadRegisterImm;
static const MI_LOAD_REGISTER_REG cmdInitLoadRegisterReg;
static const MI_LOAD_REGISTER_MEM cmdInitLoadRegisterMem;
static const MI_STORE_DATA_IMM cmdInitStoreDataImm;
static const MI_STORE_REGISTER_MEM cmdInitStoreRegisterMem;
static const MI_NOOP cmdInitNoop;
static const MI_REPORT_PERF_COUNT cmdInitReportPerfCount;
static const MI_ATOMIC cmdInitAtomic;
static const PIPELINE_SELECT cmdInitPipelineSelect;
static const MI_ARB_CHECK cmdInitArbCheck;
static const MEDIA_VFE_STATE cmdInitMediaVfeState;
static const STATE_BASE_ADDRESS cmdInitStateBaseAddress;
static const MEDIA_SURFACE_STATE cmdInitMediaSurfaceState;
static const SAMPLER_STATE cmdInitSamplerState;
static const GPGPU_CSR_BASE_ADDRESS cmdInitGpgpuCsrBaseAddress;
static const STATE_SIP cmdInitStateSip;
static const BINDING_TABLE_STATE cmdInitBindingTableState;
static const MI_USER_INTERRUPT cmdInitUserInterrupt;
static const XY_SRC_COPY_BLT cmdInitXyCopyBlt;
static const MI_FLUSH_DW cmdInitMiFlushDw;
static constexpr bool supportsCmdSet(GFXCORE_FAMILY cmdSetBaseFamily) {
return cmdSetBaseFamily == IGFX_GEN8_CORE;
}
};
struct CNL : public CNLFamily {
static const PLATFORM platform;
static const HardwareInfo hwInfo;
static FeatureTable featureTable;
static WorkaroundTable workaroundTable;
static const uint32_t threadsPerEu = 7;
static const uint32_t maxEuPerSubslice = 8;
static const uint32_t maxSlicesSupported = 4;
static const uint32_t maxSubslicesSupported = 9;
static const RuntimeCapabilityTable capabilityTable;
static void (*setupHardwareInfo)(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const std::string &hwInfoConfig);
static void setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo);
};
class CNL_2x5x8 : public CNL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static const HardwareInfo hwInfo;
private:
static GT_SYSTEM_INFO gtSystemInfo;
};
class CNL_2x4x8 : public CNL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static const HardwareInfo hwInfo;
private:
static GT_SYSTEM_INFO gtSystemInfo;
};
class CNL_1x3x8 : public CNL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static const HardwareInfo hwInfo;
private:
static GT_SYSTEM_INFO gtSystemInfo;
};
class CNL_1x2x8 : public CNL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static const HardwareInfo hwInfo;
private:
static GT_SYSTEM_INFO gtSystemInfo;
};
class CNL_4x9x8 : public CNL {
public:
static void setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable);
static const HardwareInfo hwInfo;
private:
static GT_SYSTEM_INFO gtSystemInfo;
};
} // namespace NEO

File diff suppressed because it is too large Load Diff

View File

@ -1,605 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#pragma pack(1)
typedef struct tagMEDIA_SURFACE_STATE {
union tagTheStructure {
struct tagCommon {
uint32_t Reserved_0 : BITFIELD_RANGE(0, 29);
uint32_t Rotation : BITFIELD_RANGE(30, 31);
uint32_t Cr_VCb_UPixelOffsetVDirection : BITFIELD_RANGE(0, 1);
uint32_t PictureStructure : BITFIELD_RANGE(2, 3);
uint32_t Width : BITFIELD_RANGE(4, 17);
uint32_t Height : BITFIELD_RANGE(18, 31);
uint32_t TileMode : BITFIELD_RANGE(0, 1);
uint32_t HalfPitchForChroma : BITFIELD_RANGE(2, 2);
uint32_t SurfacePitch : BITFIELD_RANGE(3, 20);
uint32_t AddressControl : BITFIELD_RANGE(21, 21);
uint32_t MemoryCompressionEnable : BITFIELD_RANGE(22, 22);
uint32_t MemoryCompressionMode : BITFIELD_RANGE(23, 23);
uint32_t Cr_VCb_UPixelOffsetVDirectionMsb : BITFIELD_RANGE(24, 24);
uint32_t Cr_VCb_UPixelOffsetUDirection : BITFIELD_RANGE(25, 25);
uint32_t InterleaveChroma : BITFIELD_RANGE(26, 26);
uint32_t SurfaceFormat : BITFIELD_RANGE(27, 31);
uint32_t YOffsetForU_Cb : BITFIELD_RANGE(0, 13);
uint32_t Reserved_110 : BITFIELD_RANGE(14, 15);
uint32_t XOffsetForU_Cb : BITFIELD_RANGE(16, 29);
uint32_t Reserved_126 : BITFIELD_RANGE(30, 31);
uint32_t Reserved_128;
uint32_t SurfaceMemoryObjectControlState_Reserved : BITFIELD_RANGE(0, 0);
uint32_t SurfaceMemoryObjectControlState_IndexToMocsTables : BITFIELD_RANGE(1, 6);
uint32_t Reserved_167 : BITFIELD_RANGE(7, 17);
uint32_t TiledResourceMode : BITFIELD_RANGE(18, 19);
uint32_t Depth : BITFIELD_RANGE(20, 23);
uint32_t Reserved_184 : BITFIELD_RANGE(24, 29);
uint32_t VerticalLineStrideOffset : BITFIELD_RANGE(30, 30);
uint32_t VerticalLineStride : BITFIELD_RANGE(31, 31);
uint32_t SurfaceBaseAddressLow;
uint32_t SurfaceBaseAddressHigh : BITFIELD_RANGE(0, 15);
uint32_t Reserved_240 : BITFIELD_RANGE(16, 31);
} Common;
struct tagSurfaceFormatIsNotOneOfPlanarFormats {
uint32_t Reserved_0;
uint32_t Reserved_32;
uint32_t Reserved_64;
uint32_t Reserved_96;
uint32_t Reserved_128;
uint32_t Reserved_160;
uint32_t Reserved_192;
uint32_t Reserved_224;
} SurfaceFormatIsNotOneOfPlanarFormats;
struct tagSurfaceFormatIsOneOfPlanarFormats {
uint32_t Reserved_0 : BITFIELD_RANGE(0, 15);
uint32_t YOffset : BITFIELD_RANGE(16, 19);
uint32_t XOffset : BITFIELD_RANGE(20, 26);
uint32_t Reserved_27 : BITFIELD_RANGE(27, 31);
uint32_t Reserved_32;
uint32_t Reserved_64;
uint32_t Reserved_96;
uint32_t Reserved_128;
uint32_t Reserved_160;
uint32_t Reserved_192;
uint32_t Reserved_224;
} SurfaceFormatIsOneOfPlanarFormats;
struct tag_SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0 {
uint32_t Reserved_0;
uint32_t Reserved_32;
uint32_t Reserved_64;
uint32_t Reserved_96;
uint32_t YOffsetForV_Cr : BITFIELD_RANGE(0, 14);
uint32_t Reserved_143 : BITFIELD_RANGE(15, 15);
uint32_t XOffsetForV_Cr : BITFIELD_RANGE(16, 29);
uint32_t Reserved_158 : BITFIELD_RANGE(30, 31);
uint32_t Reserved_160;
uint32_t Reserved_192;
uint32_t Reserved_224;
} _SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0;
uint32_t RawData[8];
} TheStructure;
typedef enum tagROTATION {
ROTATION_NO_ROTATION_OR_0_DEGREE = 0x0,
ROTATION_90_DEGREE_ROTATION = 0x1,
ROTATION_180_DEGREE_ROTATION = 0x2,
ROTATION_270_DEGREE_ROTATION = 0x3,
} ROTATION;
typedef enum tagPICTURE_STRUCTURE {
PICTURE_STRUCTURE_FRAME_PICTURE = 0x0,
PICTURE_STRUCTURE_TOP_FIELD_PICTURE = 0x1,
PICTURE_STRUCTURE_BOTTOM_FIELD_PICTURE = 0x2,
PICTURE_STRUCTURE_INVALID_NOT_ALLOWED = 0x3,
} PICTURE_STRUCTURE;
typedef enum tagTILE_MODE {
TILE_MODE_TILEMODE_LINEAR = 0x0,
TILE_MODE_TILEMODE_XMAJOR = 0x2,
TILE_MODE_TILEMODE_YMAJOR = 0x3,
} TILE_MODE;
typedef enum tagADDRESS_CONTROL {
ADDRESS_CONTROL_CLAMP = 0x0,
ADDRESS_CONTROL_MIRROR = 0x1,
} ADDRESS_CONTROL;
typedef enum tagMEMORY_COMPRESSION_MODE {
MEMORY_COMPRESSION_MODE_HORIZONTAL_COMPRESSION_MODE = 0x0,
MEMORY_COMPRESSION_MODE_VERTICAL_COMPRESSION_MODE = 0x1,
} MEMORY_COMPRESSION_MODE;
typedef enum tagSURFACE_FORMAT {
SURFACE_FORMAT_YCRCB_NORMAL = 0x0,
SURFACE_FORMAT_YCRCB_SWAPUVY = 0x1,
SURFACE_FORMAT_YCRCB_SWAPUV = 0x2,
SURFACE_FORMAT_YCRCB_SWAPY = 0x3,
SURFACE_FORMAT_PLANAR_420_8 = 0x4,
SURFACE_FORMAT_Y8_UNORM_VA = 0x5,
SURFACE_FORMAT_Y16_SNORM = 0x6,
SURFACE_FORMAT_Y16_UNORM_VA = 0x7,
SURFACE_FORMAT_R10G10B10A2_UNORM = 0x8,
SURFACE_FORMAT_R8G8B8A8_UNORM = 0x9,
SURFACE_FORMAT_R8B8_UNORM_CRCB = 0xa,
SURFACE_FORMAT_R8_UNORM_CR_CB = 0xb,
SURFACE_FORMAT_Y8_UNORM = 0xc,
SURFACE_FORMAT_A8Y8U8V8_UNORM = 0xd,
SURFACE_FORMAT_B8G8R8A8_UNORM = 0xe,
SURFACE_FORMAT_R16G16B16A16 = 0xf,
SURFACE_FORMAT_Y1_UNORM = 0x10,
SURFACE_FORMAT_Y32_UNORM = 0x11,
SURFACE_FORMAT_PLANAR_422_8 = 0x12,
SURFACE_FORMAT_FM_STRBUF_Y1 = 0x13,
SURFACE_FORMAT_FM_STRBUF_Y8 = 0x14,
SURFACE_FORMAT_FM_STRBUF_Y16 = 0x15,
SURFACE_FORMAT_FM_STRBUF_Y32 = 0x16,
SURFACE_FORMAT_PLANAR_420_16 = 0x17,
SURFACE_FORMAT_R16B16_UNORM_CRCB = 0x18,
SURFACE_FORMAT_R16_UNORM_CR_CB = 0x19,
SURFACE_FORMAT_Y16_UNORM = 0x1a,
} SURFACE_FORMAT;
typedef enum tagSURFACE_MEMORY_OBJECT_CONTROL_STATE {
SURFACE_MEMORY_OBJECT_CONTROL_STATE_DEFAULTVAUEDESC = 0x0,
} SURFACE_MEMORY_OBJECT_CONTROL_STATE;
typedef enum tagTILED_RESOURCE_MODE {
TILED_RESOURCE_MODE_TRMODE_NONE = 0x0,
TILED_RESOURCE_MODE_TRMODE_TILEYF = 0x1,
TILED_RESOURCE_MODE_TRMODE_TILEYS = 0x2,
} TILED_RESOURCE_MODE;
typedef enum tagPATCH_CONSTANTS {
SURFACEBASEADDRESS_BYTEOFFSET = 0x18,
SURFACEBASEADDRESS_INDEX = 0x6,
SURFACEBASEADDRESSHIGH_BYTEOFFSET = 0x1c,
SURFACEBASEADDRESSHIGH_INDEX = 0x7,
} PATCH_CONSTANTS;
inline void init(void) {
memset(&TheStructure, 0, sizeof(TheStructure));
TheStructure.Common.Rotation = ROTATION_NO_ROTATION_OR_0_DEGREE;
TheStructure.Common.PictureStructure = PICTURE_STRUCTURE_FRAME_PICTURE;
TheStructure.Common.TileMode = TILE_MODE_TILEMODE_LINEAR;
TheStructure.Common.AddressControl = ADDRESS_CONTROL_CLAMP;
TheStructure.Common.MemoryCompressionMode = MEMORY_COMPRESSION_MODE_HORIZONTAL_COMPRESSION_MODE;
TheStructure.Common.SurfaceFormat = SURFACE_FORMAT_YCRCB_NORMAL;
TheStructure.Common.TiledResourceMode = TILED_RESOURCE_MODE_TRMODE_NONE;
}
static tagMEDIA_SURFACE_STATE sInit(void) {
MEDIA_SURFACE_STATE state;
state.init();
return state;
}
inline uint32_t &getRawData(const uint32_t index) {
DEBUG_BREAK_IF(index >= 8);
return TheStructure.RawData[index];
}
inline void setRotation(const ROTATION value) {
TheStructure.Common.Rotation = value;
}
inline ROTATION getRotation(void) const {
return static_cast<ROTATION>(TheStructure.Common.Rotation);
}
inline void setCrVCbUPixelOffsetVDirection(const uint32_t value) {
TheStructure.Common.Cr_VCb_UPixelOffsetVDirection = value;
}
inline uint32_t getCrVCbUPixelOffsetVDirection(void) const {
return (TheStructure.Common.Cr_VCb_UPixelOffsetVDirection);
}
inline void setPictureStructure(const PICTURE_STRUCTURE value) {
TheStructure.Common.PictureStructure = value;
}
inline PICTURE_STRUCTURE getPictureStructure(void) const {
return static_cast<PICTURE_STRUCTURE>(TheStructure.Common.PictureStructure);
}
inline void setWidth(const uint32_t value) {
TheStructure.Common.Width = value - 1;
}
inline uint32_t getWidth(void) const {
return (TheStructure.Common.Width + 1);
}
inline void setHeight(const uint32_t value) {
TheStructure.Common.Height = value - 1;
}
inline uint32_t getHeight(void) const {
return (TheStructure.Common.Height + 1);
}
inline void setTileMode(const TILE_MODE value) {
TheStructure.Common.TileMode = value;
}
inline TILE_MODE getTileMode(void) const {
return static_cast<TILE_MODE>(TheStructure.Common.TileMode);
}
inline void setHalfPitchForChroma(const bool value) {
TheStructure.Common.HalfPitchForChroma = value;
}
inline bool getHalfPitchForChroma(void) const {
return (TheStructure.Common.HalfPitchForChroma);
}
inline void setSurfacePitch(const uint32_t value) {
TheStructure.Common.SurfacePitch = value - 1;
}
inline uint32_t getSurfacePitch(void) const {
return (TheStructure.Common.SurfacePitch + 1);
}
inline void setAddressControl(const ADDRESS_CONTROL value) {
TheStructure.Common.AddressControl = value;
}
inline ADDRESS_CONTROL getAddressControl(void) const {
return static_cast<ADDRESS_CONTROL>(TheStructure.Common.AddressControl);
}
inline void setMemoryCompressionEnable(const bool value) {
TheStructure.Common.MemoryCompressionEnable = value;
}
inline bool getMemoryCompressionEnable(void) const {
return (TheStructure.Common.MemoryCompressionEnable);
}
inline void setMemoryCompressionMode(const MEMORY_COMPRESSION_MODE value) {
TheStructure.Common.MemoryCompressionMode = value;
}
inline MEMORY_COMPRESSION_MODE getMemoryCompressionMode(void) const {
return static_cast<MEMORY_COMPRESSION_MODE>(TheStructure.Common.MemoryCompressionMode);
}
inline void setCrVCbUPixelOffsetVDirectionMsb(const uint32_t value) {
TheStructure.Common.Cr_VCb_UPixelOffsetVDirectionMsb = value;
}
inline uint32_t getCrVCbUPixelOffsetVDirectionMsb(void) const {
return (TheStructure.Common.Cr_VCb_UPixelOffsetVDirectionMsb);
}
inline void setCrVCbUPixelOffsetUDirection(const uint32_t value) {
TheStructure.Common.Cr_VCb_UPixelOffsetUDirection = value;
}
inline uint32_t getCrVCbUPixelOffsetUDirection(void) const {
return (TheStructure.Common.Cr_VCb_UPixelOffsetUDirection);
}
inline void setInterleaveChroma(const bool value) {
TheStructure.Common.InterleaveChroma = value;
}
inline bool getInterleaveChroma(void) const {
return (TheStructure.Common.InterleaveChroma);
}
inline void setSurfaceFormat(const SURFACE_FORMAT value) {
TheStructure.Common.SurfaceFormat = value;
}
inline SURFACE_FORMAT getSurfaceFormat(void) const {
return static_cast<SURFACE_FORMAT>(TheStructure.Common.SurfaceFormat);
}
inline void setYOffsetForUCb(const uint32_t value) {
TheStructure.Common.YOffsetForU_Cb = value;
}
inline uint32_t getYOffsetForUCb(void) const {
return (TheStructure.Common.YOffsetForU_Cb);
}
inline void setXOffsetForUCb(const uint32_t value) {
TheStructure.Common.XOffsetForU_Cb = value;
}
inline uint32_t getXOffsetForUCb(void) const {
return (TheStructure.Common.XOffsetForU_Cb);
}
inline void setSurfaceMemoryObjectControlStateReserved(const uint32_t value) {
TheStructure.Common.SurfaceMemoryObjectControlState_Reserved = value;
}
inline uint32_t getSurfaceMemoryObjectControlStateReserved(void) const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_Reserved);
}
inline void setSurfaceMemoryObjectControlStateIndexToMocsTables(const uint32_t value) {
TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables = value >> 1;
}
inline uint32_t getSurfaceMemoryObjectControlStateIndexToMocsTables(void) const {
return (TheStructure.Common.SurfaceMemoryObjectControlState_IndexToMocsTables << 1);
}
inline void setTiledResourceMode(const TILED_RESOURCE_MODE value) {
TheStructure.Common.TiledResourceMode = value;
}
inline TILED_RESOURCE_MODE getTiledResourceMode(void) const {
return static_cast<TILED_RESOURCE_MODE>(TheStructure.Common.TiledResourceMode);
}
inline void setDepth(const uint32_t value) {
TheStructure.Common.Depth = value;
}
inline uint32_t getDepth(void) const {
return (TheStructure.Common.Depth);
}
inline void setVerticalLineStrideOffset(const uint32_t value) {
TheStructure.Common.VerticalLineStrideOffset = value;
}
inline uint32_t getVerticalLineStrideOffset(void) const {
return (TheStructure.Common.VerticalLineStrideOffset);
}
inline void setVerticalLineStride(const uint32_t value) {
TheStructure.Common.VerticalLineStride = value;
}
inline uint32_t getVerticalLineStride(void) const {
return (TheStructure.Common.VerticalLineStride);
}
inline void setSurfaceBaseAddress(const uint64_t value) {
TheStructure.Common.SurfaceBaseAddressLow = static_cast<uint32_t>(value);
TheStructure.Common.SurfaceBaseAddressHigh = value >> 32;
}
inline uint64_t getSurfaceBaseAddress(void) const {
return (TheStructure.Common.SurfaceBaseAddressLow |
static_cast<uint64_t>(TheStructure.Common.SurfaceBaseAddressHigh) << 32);
}
inline void setSurfaceBaseAddressHigh(const uint32_t value) {
TheStructure.Common.SurfaceBaseAddressHigh = value;
}
inline uint32_t getSurfaceBaseAddressHigh(void) const {
return (TheStructure.Common.SurfaceBaseAddressHigh);
}
typedef enum tagYOFFSET {
YOFFSET_BIT_SHIFT = 0x2,
YOFFSET_ALIGN_SIZE = 0x4,
} YOFFSET;
inline void setYOffset(const uint32_t value) {
TheStructure.SurfaceFormatIsOneOfPlanarFormats.YOffset = value >> YOFFSET_BIT_SHIFT;
}
inline uint32_t getYOffset(void) const {
return (TheStructure.SurfaceFormatIsOneOfPlanarFormats.YOffset << YOFFSET_BIT_SHIFT);
}
typedef enum tagXOFFSET {
XOFFSET_BIT_SHIFT = 0x2,
XOFFSET_ALIGN_SIZE = 0x4,
} XOFFSET;
inline void setXOffset(const uint32_t value) {
TheStructure.SurfaceFormatIsOneOfPlanarFormats.XOffset = value >> XOFFSET_BIT_SHIFT;
}
inline uint32_t getXOffset(void) const {
return (TheStructure.SurfaceFormatIsOneOfPlanarFormats.XOffset << XOFFSET_BIT_SHIFT);
}
inline void setYOffsetForVCr(const uint32_t value) {
TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.YOffsetForV_Cr = value;
}
inline uint32_t getYOffsetForVCr(void) const {
return (TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.YOffsetForV_Cr);
}
inline void setXOffsetForVCr(const uint32_t value) {
TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.XOffsetForV_Cr = value;
}
inline uint32_t getXOffsetForVCr(void) const {
return (TheStructure._SurfaceFormatIsOneOfPlanarAnd_InterleaveChromaIs0.XOffsetForV_Cr);
}
} MEDIA_SURFACE_STATE;
STATIC_ASSERT(32 == sizeof(MEDIA_SURFACE_STATE));
typedef struct tagMI_MATH {
union _DW0 {
struct _BitField {
uint32_t DwordLength : BITFIELD_RANGE(0, 5);
uint32_t Reserved : BITFIELD_RANGE(6, 22);
uint32_t InstructionOpcode : BITFIELD_RANGE(23, 28);
uint32_t InstructionType : BITFIELD_RANGE(29, 31);
} BitField;
uint32_t Value;
} DW0;
typedef enum tagMI_COMMAND_OPCODE {
MI_COMMAND_OPCODE_MI_MATH = 0x1A,
} MI_COMMAND_OPCODE;
typedef enum tagCOMMAND_TYPE {
COMMAND_TYPE_MI_COMMAND = 0x0,
} COMMAND_TYPE;
} MI_MATH;
typedef struct tagMI_MATH_ALU_INST_INLINE {
union _DW0 {
struct _BitField {
uint32_t Operand2 : BITFIELD_RANGE(0, 9);
uint32_t Operand1 : BITFIELD_RANGE(10, 19);
uint32_t ALUOpcode : BITFIELD_RANGE(20, 31);
} BitField;
uint32_t Value;
} DW0;
} MI_MATH_ALU_INST_INLINE;
typedef struct tagMI_SEMAPHORE_WAIT {
union tagTheStructure {
struct tagCommon {
uint32_t DwordLength : BITFIELD_RANGE(0, 7);
uint32_t Reserved_8 : BITFIELD_RANGE(8, 11);
uint32_t CompareOperation : BITFIELD_RANGE(12, 14);
uint32_t WaitMode : BITFIELD_RANGE(15, 15);
uint32_t RegisterPollMode : BITFIELD_RANGE(16, 16);
uint32_t Reserved_17 : BITFIELD_RANGE(17, 21);
uint32_t MemoryType : BITFIELD_RANGE(22, 22);
uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28);
uint32_t CommandType : BITFIELD_RANGE(29, 31);
uint32_t SemaphoreDataDword;
uint64_t Reserved_64 : BITFIELD_RANGE(0, 1);
uint64_t SemaphoreAddress_Graphicsaddress : BITFIELD_RANGE(2, 47);
uint64_t SemaphoreAddress_Reserved : BITFIELD_RANGE(48, 63);
} Common;
uint32_t RawData[4];
} TheStructure;
typedef enum tagDWORD_LENGTH {
DWORD_LENGTH_EXCLUDES_DWORD_0_1 = 0x2,
} DWORD_LENGTH;
typedef enum tagCOMPARE_OPERATION {
COMPARE_OPERATION_SAD_GREATER_THAN_SDD = 0x0,
COMPARE_OPERATION_SAD_GREATER_THAN_OR_EQUAL_SDD = 0x1,
COMPARE_OPERATION_SAD_LESS_THAN_SDD = 0x2,
COMPARE_OPERATION_SAD_LESS_THAN_OR_EQUAL_SDD = 0x3,
COMPARE_OPERATION_SAD_EQUAL_SDD = 0x4,
COMPARE_OPERATION_SAD_NOT_EQUAL_SDD = 0x5,
} COMPARE_OPERATION;
typedef enum tagWAIT_MODE {
WAIT_MODE_SIGNAL_MODE = 0x0,
WAIT_MODE_POLLING_MODE = 0x1,
} WAIT_MODE;
typedef enum tagREGISTER_POLL_MODE {
REGISTER_POLL_MODE_MEMORY_POLL = 0x0,
REGISTER_POLL_MODE_REGISTER_POLL = 0x1,
} REGISTER_POLL_MODE;
typedef enum tagMEMORY_TYPE {
MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS = 0x0,
MEMORY_TYPE_GLOBAL_GRAPHICS_ADDRESS = 0x1,
} MEMORY_TYPE;
typedef enum tagMI_COMMAND_OPCODE {
MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT = 0x1c,
} MI_COMMAND_OPCODE;
typedef enum tagCOMMAND_TYPE {
COMMAND_TYPE_MI_COMMAND = 0x0,
} COMMAND_TYPE;
inline void init(void) {
memset(&TheStructure, 0, sizeof(TheStructure));
TheStructure.Common.DwordLength = DWORD_LENGTH_EXCLUDES_DWORD_0_1;
TheStructure.Common.CompareOperation = COMPARE_OPERATION_SAD_GREATER_THAN_SDD;
TheStructure.Common.WaitMode = WAIT_MODE_SIGNAL_MODE;
TheStructure.Common.RegisterPollMode = REGISTER_POLL_MODE_MEMORY_POLL;
TheStructure.Common.MemoryType = MEMORY_TYPE_PER_PROCESS_GRAPHICS_ADDRESS;
TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_SEMAPHORE_WAIT;
TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND;
}
static tagMI_SEMAPHORE_WAIT sInit(void) {
MI_SEMAPHORE_WAIT state;
state.init();
return state;
}
inline uint32_t &getRawData(const uint32_t index) {
DEBUG_BREAK_IF(index >= 4);
return TheStructure.RawData[index];
}
inline void setCompareOperation(const COMPARE_OPERATION value) {
TheStructure.Common.CompareOperation = value;
}
inline COMPARE_OPERATION getCompareOperation(void) const {
return static_cast<COMPARE_OPERATION>(TheStructure.Common.CompareOperation);
}
inline void setWaitMode(const WAIT_MODE value) {
TheStructure.Common.WaitMode = value;
}
inline WAIT_MODE getWaitMode(void) const {
return static_cast<WAIT_MODE>(TheStructure.Common.WaitMode);
}
inline void setRegisterPollMode(const REGISTER_POLL_MODE value) {
TheStructure.Common.RegisterPollMode = value;
}
inline REGISTER_POLL_MODE getRegisterPollMode(void) const {
return static_cast<REGISTER_POLL_MODE>(TheStructure.Common.RegisterPollMode);
}
inline void setMemoryType(const MEMORY_TYPE value) {
TheStructure.Common.MemoryType = value;
}
inline MEMORY_TYPE getMemoryType(void) const {
return static_cast<MEMORY_TYPE>(TheStructure.Common.MemoryType);
}
inline void setSemaphoreDataDword(const uint32_t value) {
TheStructure.Common.SemaphoreDataDword = value;
}
inline uint32_t getSemaphoreDataDword(void) const {
return (TheStructure.Common.SemaphoreDataDword);
}
typedef enum tagSEMAPHOREADDRESS_GRAPHICSADDRESS {
SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT = 0x2,
SEMAPHOREADDRESS_GRAPHICSADDRESS_ALIGN_SIZE = 0x4,
} SEMAPHOREADDRESS_GRAPHICSADDRESS;
inline void setSemaphoreGraphicsAddress(const uint64_t value) {
TheStructure.Common.SemaphoreAddress_Graphicsaddress = value >> SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT;
}
inline uint64_t getSemaphoreGraphicsAddress(void) const {
return (TheStructure.Common.SemaphoreAddress_Graphicsaddress << SEMAPHOREADDRESS_GRAPHICSADDRESS_BIT_SHIFT);
}
typedef enum tagSEMAPHOREADDRESS_RESERVED {
SEMAPHOREADDRESS_RESERVED_BIT_SHIFT = 0x2,
SEMAPHOREADDRESS_RESERVED_ALIGN_SIZE = 0x4,
} SEMAPHOREADDRESS_RESERVED;
inline void setSemaphoreAddressReserved(const uint64_t value) {
TheStructure.Common.SemaphoreAddress_Reserved = value >> SEMAPHOREADDRESS_RESERVED_BIT_SHIFT;
}
inline uint64_t getSemaphoreAddressReserved(void) const {
return (TheStructure.Common.SemaphoreAddress_Reserved << SEMAPHOREADDRESS_RESERVED_BIT_SHIFT);
}
} MI_SEMAPHORE_WAIT;
STATIC_ASSERT(16 == sizeof(MI_SEMAPHORE_WAIT));
typedef struct tagMI_STORE_DATA_IMM {
union tagTheStructure {
struct tagCommon {
uint32_t DwordLength : BITFIELD_RANGE(0, 9);
uint32_t Reserved_10 : BITFIELD_RANGE(10, 20);
uint32_t StoreQword : BITFIELD_RANGE(21, 21);
uint32_t UseGlobalGtt : BITFIELD_RANGE(22, 22);
uint32_t MiCommandOpcode : BITFIELD_RANGE(23, 28);
uint32_t CommandType : BITFIELD_RANGE(29, 31);
uint64_t CoreModeEnable : BITFIELD_RANGE(0, 0);
uint64_t Reserved_33 : BITFIELD_RANGE(1, 1);
uint64_t Address_Graphicsaddress47_2 : BITFIELD_RANGE(2, 47);
uint64_t Address_Reserved : BITFIELD_RANGE(48, 63);
uint32_t DataDword0;
uint32_t DataDword1;
} Common;
uint32_t RawData[5];
} TheStructure;
typedef enum tagDWORD_LENGTH {
DWORD_LENGTH_STORE_DWORD = 0x2,
DWORD_LENGTH_STORE_QWORD = 0x3,
} DWORD_LENGTH;
typedef enum tagMI_COMMAND_OPCODE {
MI_COMMAND_OPCODE_MI_STORE_DATA_IMM = 0x20,
} MI_COMMAND_OPCODE;
typedef enum tagCOMMAND_TYPE {
COMMAND_TYPE_MI_COMMAND = 0x0,
} COMMAND_TYPE;
inline void init(void) {
memset(&TheStructure, 0, sizeof(TheStructure));
TheStructure.Common.DwordLength = DWORD_LENGTH_STORE_DWORD;
TheStructure.Common.MiCommandOpcode = MI_COMMAND_OPCODE_MI_STORE_DATA_IMM;
TheStructure.Common.CommandType = COMMAND_TYPE_MI_COMMAND;
}
static tagMI_STORE_DATA_IMM sInit(void) {
MI_STORE_DATA_IMM state;
state.init();
return state;
}
inline uint32_t &getRawData(const uint32_t index) {
DEBUG_BREAK_IF(index >= 5);
return TheStructure.RawData[index];
}
inline void setDwordLength(const DWORD_LENGTH value) {
TheStructure.Common.DwordLength = value;
}
inline DWORD_LENGTH getDwordLength(void) const {
return static_cast<DWORD_LENGTH>(TheStructure.Common.DwordLength);
}
inline void setStoreQword(const bool value) {
TheStructure.Common.StoreQword = value;
}
inline bool getStoreQword(void) const {
return (TheStructure.Common.StoreQword);
}
inline void setUseGlobalGtt(const bool value) {
TheStructure.Common.UseGlobalGtt = value;
}
inline bool getUseGlobalGtt(void) const {
return (TheStructure.Common.UseGlobalGtt);
}
inline void setCoreModeEnable(const uint64_t value) {
TheStructure.Common.CoreModeEnable = value;
}
inline uint64_t getCoreModeEnable(void) const {
return (TheStructure.Common.CoreModeEnable);
}
typedef enum tagADDRESS_GRAPHICSADDRESS47_2 {
ADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT = 0x2,
ADDRESS_GRAPHICSADDRESS47_2_ALIGN_SIZE = 0x4,
} ADDRESS_GRAPHICSADDRESS47_2;
inline void setAddress(const uint64_t value) {
TheStructure.Common.Address_Graphicsaddress47_2 = value >> ADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT;
}
inline uint64_t getAddress(void) const {
return (TheStructure.Common.Address_Graphicsaddress47_2 << ADDRESS_GRAPHICSADDRESS47_2_BIT_SHIFT);
}
typedef enum tagADDRESS_RESERVED {
ADDRESS_RESERVED_BIT_SHIFT = 0x2,
ADDRESS_RESERVED_ALIGN_SIZE = 0x4,
} ADDRESS_RESERVED;
inline void setAddressReserved(const uint64_t value) {
TheStructure.Common.Address_Reserved = value >> ADDRESS_RESERVED_BIT_SHIFT;
}
inline uint64_t getAddressReserved(void) const {
return (TheStructure.Common.Address_Reserved << ADDRESS_RESERVED_BIT_SHIFT);
}
inline void setDataDword0(const uint32_t value) {
TheStructure.Common.DataDword0 = value;
}
inline uint32_t getDataDword0(void) const {
return (TheStructure.Common.DataDword0);
}
inline void setDataDword1(const uint32_t value) {
TheStructure.Common.DataDword1 = value;
}
inline uint32_t getDataDword1(void) const {
return (TheStructure.Common.DataDword1);
}
} MI_STORE_DATA_IMM;
STATIC_ASSERT(20 == sizeof(MI_STORE_DATA_IMM));
#pragma pack()

View File

@ -1,34 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/aub/aub_helper_bdw_plus.inl"
#include "runtime/helpers/flat_batch_buffer_helper_hw.inl"
#include "runtime/helpers/hw_helper_bdw_plus.inl"
namespace NEO {
typedef CNLFamily Family;
template <>
void HwHelperHw<Family>::setCapabilityCoherencyFlag(const HardwareInfo *pHwInfo, bool &coherencyFlag) {
if (pHwInfo->platform.usRevId < 0x4) {
coherencyFlag = false;
} else {
coherencyFlag = true;
}
}
template <>
bool HwHelperHw<Family>::setupPreemptionRegisters(HardwareInfo *pHwInfo, bool enable) {
pHwInfo->capabilityTable.whitelistedRegisters.csChicken1_0x2580 = enable;
return pHwInfo->capabilityTable.whitelistedRegisters.csChicken1_0x2580;
}
template class AubHelperHw<Family>;
template class HwHelperHw<Family>;
template class FlatBatchBufferHelperHw<Family>;
template struct PipeControlHelper<Family>;
} // namespace NEO

View File

@ -1,30 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/helpers/hw_info.h"
namespace NEO {
struct CNLFamily;
struct CNL;
template <>
struct GfxFamilyMapper<IGFX_GEN10_CORE> {
typedef CNLFamily GfxFamily;
static const char *name;
};
template <>
struct HwMapper<IGFX_CANNONLAKE> {
enum { gfxFamily = IGFX_GEN10_CORE };
static const char *abbreviation;
typedef GfxFamilyMapper<static_cast<GFXCORE_FAMILY>(gfxFamily)>::GfxFamily GfxFamily;
typedef CNL GfxProduct;
};
} // namespace NEO

View File

@ -1,300 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/aub_mem_dump/aub_services.h"
#include "runtime/memory_manager/memory_constants.h"
#include "engine_node.h"
#include "hw_cmds.h"
#include "hw_info.h"
namespace NEO {
const char *HwMapper<IGFX_CANNONLAKE>::abbreviation = "cnl";
bool isSimulationCNL(unsigned short deviceId) {
switch (deviceId) {
case ICNL_3x8_DESK_DEVICE_F0_ID:
case ICNL_5x8_DESK_DEVICE_F0_ID:
case ICNL_9x8_DESK_DEVICE_F0_ID:
case ICNL_13x8_DESK_DEVICE_F0_ID:
return true;
}
return false;
};
const PLATFORM CNL::platform = {
IGFX_CANNONLAKE,
PCH_UNKNOWN,
IGFX_GEN10_CORE,
IGFX_GEN10_CORE,
PLATFORM_NONE, // default init
0, // usDeviceID
0, // usRevId. 0 sets the stepping to A0
0, // usDeviceID_PCH
0, // usRevId_PCH
GTTYPE_UNDEFINED};
const RuntimeCapabilityTable CNL::capabilityTable{
{0, 0, 0, false, false, false}, // kmdNotifyProperties
{true, true}, // whitelistedRegisters
MemoryConstants::max48BitAddress, // gpuAddressSpace
83.333, // defaultProfilingTimerResolution
MemoryConstants::pageSize, // requiredPreemptionSurfaceSize
&isSimulationCNL, // isSimulation
PreemptionMode::MidThread, // defaultPreemptionMode
aub_stream::ENGINE_RCS, // defaultEngineType
0, // maxRenderFrequency
21, // clVersionSupport
CmdServicesMemTraceVersion::DeviceValues::Cnl, // aubDeviceId
0, // extraQuantityThreadsPerEU
64, // slmSize
false, // blitterOperationsSupported
true, // ftrSupportsFP64
true, // ftrSupports64BitMath
true, // ftrSvm
true, // ftrSupportsCoherency
true, // ftrSupportsVmeAvcTextureSampler
true, // ftrSupportsVmeAvcPreemption
false, // ftrRenderCompressedBuffers
false, // ftrRenderCompressedImages
true, // ftr64KBpages
true, // instrumentationEnabled
true, // forceStatelessCompilationFor32Bit
true, // isCore
true, // sourceLevelDebuggerSupported
true, // supportsVme
false // supportCacheFlushAfterWalker
};
WorkaroundTable CNL::workaroundTable = {};
FeatureTable CNL::featureTable = {};
void CNL::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
FeatureTable *featureTable = &hwInfo->featureTable;
WorkaroundTable *workaroundTable = &hwInfo->workaroundTable;
featureTable->ftrL3IACoherency = true;
featureTable->ftrGpGpuMidBatchPreempt = true;
featureTable->ftrGpGpuThreadGroupLevelPreempt = true;
featureTable->ftrGpGpuMidThreadLevelPreempt = true;
featureTable->ftr3dMidBatchPreempt = true;
featureTable->ftr3dObjectLevelPreempt = true;
featureTable->ftrPerCtxtPreemptionGranularityControl = true;
featureTable->ftrPPGTT = true;
featureTable->ftrSVM = true;
featureTable->ftrIA32eGfxPTEs = true;
featureTable->ftrStandardMipTailFormat = true;
featureTable->ftrDisplayYTiling = true;
featureTable->ftrTranslationTable = true;
featureTable->ftrUserModeTranslationTable = true;
featureTable->ftrTileMappedResource = true;
featureTable->ftrEnableGuC = true;
featureTable->ftrFbc = true;
featureTable->ftrFbc2AddressTranslation = true;
featureTable->ftrFbcBlitterTracking = true;
featureTable->ftrFbcCpuTracking = true;
featureTable->ftrAstcHdr2D = true;
featureTable->ftrAstcLdr2D = true;
featureTable->ftrTileY = true;
workaroundTable->wa4kAlignUVOffsetNV12LinearSurface = true;
workaroundTable->waSendMIFLUSHBeforeVFE = true;
workaroundTable->waReportPerfCountUseGlobalContextID = true;
workaroundTable->waSamplerCacheFlushBetweenRedescribedSurfaceReads = true;
if ((1 << hwInfo->platform.usRevId) & 0x3) {
workaroundTable->waFbcLinearSurfaceStride = true;
}
if ((1 << hwInfo->platform.usRevId) & 0x1) {
workaroundTable->waEncryptedEdramOnlyPartials = true;
}
}
const HardwareInfo CNL_2x5x8::hwInfo = {
&CNL::platform,
&CNL::featureTable,
&CNL::workaroundTable,
&CNL_2x5x8::gtSystemInfo,
CNL::capabilityTable,
};
GT_SYSTEM_INFO CNL_2x5x8::gtSystemInfo = {0};
void CNL_2x5x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->EUCount = 39;
gtSysInfo->ThreadCount = 39 * CNL::threadsPerEu;
gtSysInfo->SliceCount = 2;
gtSysInfo->SubSliceCount = 10;
gtSysInfo->L3CacheSizeInKb = 1536;
gtSysInfo->L3BankCount = 6;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CNL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CNL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CNL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo CNL_2x4x8::hwInfo = {
&CNL::platform,
&CNL::featureTable,
&CNL::workaroundTable,
&CNL_2x4x8::gtSystemInfo,
CNL::capabilityTable,
};
GT_SYSTEM_INFO CNL_2x4x8::gtSystemInfo = {0};
void CNL_2x4x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->EUCount = 31;
gtSysInfo->ThreadCount = 31 * CNL::threadsPerEu;
gtSysInfo->SliceCount = 2;
gtSysInfo->SubSliceCount = 8;
gtSysInfo->L3CacheSizeInKb = 1536;
gtSysInfo->L3BankCount = 6;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CNL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CNL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CNL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo CNL_1x3x8::hwInfo = {
&CNL::platform,
&CNL::featureTable,
&CNL::workaroundTable,
&CNL_1x3x8::gtSystemInfo,
CNL::capabilityTable,
};
GT_SYSTEM_INFO CNL_1x3x8::gtSystemInfo = {0};
void CNL_1x3x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->EUCount = 23;
gtSysInfo->ThreadCount = 23 * CNL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->SubSliceCount = 3;
gtSysInfo->L3CacheSizeInKb = 1536;
gtSysInfo->L3BankCount = 6;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CNL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CNL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CNL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo CNL_1x2x8::hwInfo = {
&CNL::platform,
&CNL::featureTable,
&CNL::workaroundTable,
&CNL_1x2x8::gtSystemInfo,
CNL::capabilityTable,
};
GT_SYSTEM_INFO CNL_1x2x8::gtSystemInfo = {0};
void CNL_1x2x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->EUCount = 15;
gtSysInfo->ThreadCount = 15 * CNL::threadsPerEu;
gtSysInfo->SliceCount = 1;
gtSysInfo->SubSliceCount = 2;
gtSysInfo->L3CacheSizeInKb = 1536;
gtSysInfo->L3BankCount = 6;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CNL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CNL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CNL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
};
const HardwareInfo CNL_4x9x8::hwInfo = {
&CNL::platform,
&CNL::featureTable,
&CNL::workaroundTable,
&CNL_4x9x8::gtSystemInfo,
CNL::capabilityTable,
};
GT_SYSTEM_INFO CNL_4x9x8::gtSystemInfo = {0};
void CNL_4x9x8::setupHardwareInfo(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable) {
GT_SYSTEM_INFO *gtSysInfo = &hwInfo->gtSystemInfo;
gtSysInfo->EUCount = 71;
gtSysInfo->ThreadCount = 71 * CNL::threadsPerEu;
gtSysInfo->SliceCount = 4;
gtSysInfo->SubSliceCount = 36;
gtSysInfo->L3CacheSizeInKb = 1536;
gtSysInfo->L3BankCount = 6;
gtSysInfo->MaxFillRate = 16;
gtSysInfo->TotalVsThreads = 336;
gtSysInfo->TotalHsThreads = 336;
gtSysInfo->TotalDsThreads = 336;
gtSysInfo->TotalGsThreads = 336;
gtSysInfo->TotalPsThreadsWindowerRange = 64;
gtSysInfo->CsrSizeInMb = 8;
gtSysInfo->MaxEuPerSubSlice = CNL::maxEuPerSubslice;
gtSysInfo->MaxSlicesSupported = CNL::maxSlicesSupported;
gtSysInfo->MaxSubSlicesSupported = CNL::maxSubslicesSupported;
gtSysInfo->IsL3HashModeEnabled = false;
gtSysInfo->IsDynamicallyPopulated = false;
if (setupFeatureTableAndWorkaroundTable) {
setupFeatureAndWorkaroundTable(hwInfo);
}
}
const HardwareInfo CNL::hwInfo = CNL_2x5x8::hwInfo;
void setupCNLHardwareInfoImpl(HardwareInfo *hwInfo, bool setupFeatureTableAndWorkaroundTable, const std::string &hwInfoConfig) {
if (hwInfoConfig == "1x2x8") {
CNL_1x2x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
} else if (hwInfoConfig == "1x3x8") {
CNL_1x3x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
} else if (hwInfoConfig == "2x5x8") {
CNL_2x5x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
} else if (hwInfoConfig == "2x4x8") {
CNL_2x4x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
} else if (hwInfoConfig == "4x9x8") {
CNL_4x9x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
} else if (hwInfoConfig == "default") {
// Default config
CNL_2x5x8::setupHardwareInfo(hwInfo, setupFeatureTableAndWorkaroundTable);
} else {
UNRECOVERABLE_IF(true);
}
}
void (*CNL::setupHardwareInfo)(HardwareInfo *, bool, const std::string &) = setupCNLHardwareInfoImpl;
} // namespace NEO

View File

@ -1,14 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#ifdef SUPPORT_CNL
#include "hw_info_cnl.inl"
#endif
namespace NEO {
const char *GfxFamilyMapper<IGFX_GEN10_CORE>::name = "Gen10";
} // namespace NEO

View File

@ -1,43 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/mem_obj/image.h"
#include "runtime/mem_obj/image.inl"
#include "hw_cmds.h"
#include <map>
namespace NEO {
typedef CNLFamily Family;
static auto gfxCore = IGFX_GEN10_CORE;
template <typename GfxFamily>
void ImageHw<GfxFamily>::setMediaSurfaceRotation(void *memory) {
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
surfaceState->setRotation(MEDIA_SURFACE_STATE::ROTATION_NO_ROTATION_OR_0_DEGREE);
surfaceState->setXOffset(0);
surfaceState->setYOffset(0);
}
template <typename GfxFamily>
void ImageHw<GfxFamily>::setSurfaceMemoryObjectControlStateIndexToMocsTable(void *memory, uint32_t value) {
using MEDIA_SURFACE_STATE = typename GfxFamily::MEDIA_SURFACE_STATE;
using SURFACE_FORMAT = typename MEDIA_SURFACE_STATE::SURFACE_FORMAT;
auto surfaceState = reinterpret_cast<MEDIA_SURFACE_STATE *>(memory);
surfaceState->setSurfaceMemoryObjectControlStateIndexToMocsTables(value);
}
#include "runtime/mem_obj/image_factory_init.inl"
} // namespace NEO

View File

@ -1,17 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/kernel_commands.h"
#include "runtime/helpers/kernel_commands.inl"
#include "runtime/helpers/kernel_commands_base.inl"
#include "hw_cmds.h"
namespace NEO {
template struct KernelCommandsHelper<CNLFamily>;
} // namespace NEO

View File

@ -1,17 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/command_stream_receiver_with_aub_dump.inl"
#include "runtime/os_interface/linux/device_command_stream.inl"
#include "runtime/os_interface/linux/drm_command_stream.inl"
namespace NEO {
template class DeviceCommandStreamReceiver<CNLFamily>;
template class DrmCommandStreamReceiver<CNLFamily>;
template class CommandStreamReceiverWithAUBDump<DrmCommandStreamReceiver<CNLFamily>>;
} // namespace NEO

View File

@ -1,38 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/hw_info.h"
#include "runtime/os_interface/hw_info_config.h"
namespace NEO {
template <>
int HwInfoConfigHw<IGFX_CANNONLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
if (nullptr == osIface) {
return 0;
}
GT_SYSTEM_INFO *gtSystemInfo = &hwInfo->gtSystemInfo;
if (gtSystemInfo->SubSliceCount == 9) {
gtSystemInfo->SliceCount = 4;
} else if (gtSystemInfo->SubSliceCount > 5) {
gtSystemInfo->SliceCount = 3;
} else if (gtSystemInfo->SubSliceCount > 3) {
gtSystemInfo->SliceCount = 2;
} else {
gtSystemInfo->SliceCount = 1;
}
if ((gtSystemInfo->SliceCount > 1) && (gtSystemInfo->IsL3HashModeEnabled)) {
gtSystemInfo->L3BankCount--;
gtSystemInfo->L3CacheSizeInKb -= 256;
}
return 0;
}
template class HwInfoConfigHw<IGFX_CANNONLAKE>;
} // namespace NEO

View File

@ -1,12 +0,0 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/os_interface/hw_info_config.inl"
#ifdef SUPPORT_CNL
#include "hw_info_config_cnl.inl"
#endif

View File

@ -1,84 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_queue/gpgpu_walker.h"
#include "runtime/command_stream/csr_definitions.h"
#include "runtime/helpers/preamble_bdw_plus.inl"
namespace NEO {
template <>
uint32_t PreambleHelper<CNLFamily>::getL3Config(const HardwareInfo &hwInfo, bool useSLM) {
uint32_t l3Config = 0;
switch (hwInfo.platform.eProductFamily) {
case IGFX_CANNONLAKE:
l3Config = getL3ConfigHelper<IGFX_CANNONLAKE>(useSLM);
break;
default:
l3Config = getL3ConfigHelper<IGFX_CANNONLAKE>(true);
}
return l3Config;
}
template <>
uint32_t PreambleHelper<CNLFamily>::getDefaultThreadArbitrationPolicy() {
return ThreadArbitrationPolicy::RoundRobinAfterDependency;
}
template <>
void PreambleHelper<CNLFamily>::programThreadArbitration(LinearStream *pCommandStream, uint32_t requiredThreadArbitrationPolicy) {
UNRECOVERABLE_IF(requiredThreadArbitrationPolicy == ThreadArbitrationPolicy::NotPresent);
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
*pipeControl = PIPE_CONTROL::sInit();
pipeControl->setCommandStreamerStallEnable(true);
auto pCmd = pCommandStream->getSpaceForCmd<MI_LOAD_REGISTER_IMM>();
*pCmd = MI_LOAD_REGISTER_IMM::sInit();
pCmd->setRegisterOffset(RowChickenReg4::address);
pCmd->setDataDword(RowChickenReg4::regDataForArbitrationPolicy[requiredThreadArbitrationPolicy]);
}
template <>
size_t PreambleHelper<CNLFamily>::getThreadArbitrationCommandsSize() {
return sizeof(MI_LOAD_REGISTER_IMM) + sizeof(PIPE_CONTROL);
}
template <>
uint32_t PreambleHelper<CNLFamily>::getUrbEntryAllocationSize() {
return 1024;
}
template <>
void PreambleHelper<CNLFamily>::addPipeControlBeforeVfeCmd(LinearStream *pCommandStream, const HardwareInfo *hwInfo) {
auto pipeControl = pCommandStream->getSpaceForCmd<PIPE_CONTROL>();
*pipeControl = PIPE_CONTROL::sInit();
pipeControl->setCommandStreamerStallEnable(true);
if (hwInfo->workaroundTable.waSendMIFLUSHBeforeVFE) {
pipeControl->setRenderTargetCacheFlushEnable(true);
pipeControl->setDepthCacheFlushEnable(true);
pipeControl->setDcFlushEnable(true);
}
}
template <>
void PreambleHelper<CNLFamily>::programPipelineSelect(LinearStream *pCommandStream, const DispatchFlags &dispatchFlags) {
typedef typename CNLFamily::PIPELINE_SELECT PIPELINE_SELECT;
auto pCmd = (PIPELINE_SELECT *)pCommandStream->getSpace(sizeof(PIPELINE_SELECT));
*pCmd = PIPELINE_SELECT::sInit();
auto mask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits;
pCmd->setMaskBits(mask);
pCmd->setPipelineSelection(PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU);
pCmd->setMediaSamplerDopClockGateEnable(!dispatchFlags.mediaSamplerRequired);
}
template struct PreambleHelper<CNLFamily>;
} // namespace NEO

View File

@ -1,61 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/built_ins/built_ins.h"
#include "runtime/command_stream/preemption.h"
#include "runtime/command_stream/preemption.inl"
#include "runtime/memory_manager/graphics_allocation.h"
namespace NEO {
typedef CNLFamily GfxFamily;
template <>
struct PreemptionConfig<GfxFamily> {
static constexpr uint32_t mmioAddress = 0x2580;
static constexpr uint32_t maskVal = (1 << 1) | (1 << 2);
static constexpr uint32_t maskShift = 16;
static constexpr uint32_t mask = maskVal << maskShift;
static constexpr uint32_t threadGroupVal = (1 << 1);
static constexpr uint32_t cmdLevelVal = (1 << 2);
static constexpr uint32_t midThreadVal = 0;
};
template <>
size_t PreemptionHelper::getPreemptionWaCsSize<GfxFamily>(const Device &device) {
return 0;
}
template <>
void PreemptionHelper::applyPreemptionWaCmdsBegin<GfxFamily>(LinearStream *pCommandStream, const Device &device) {
}
template <>
void PreemptionHelper::applyPreemptionWaCmdsEnd<GfxFamily>(LinearStream *pCommandStream, const Device &device) {
}
template void PreemptionHelper::programCmdStream<GfxFamily>(LinearStream &cmdStream,
PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode,
GraphicsAllocation *preemptionCsr, Device &device);
template size_t PreemptionHelper::getRequiredPreambleSize<GfxFamily>(const Device &device);
template void PreemptionHelper::programCsrBaseAddress<GfxFamily>(LinearStream &preambleCmdStream, Device &device, const GraphicsAllocation *preemptionCsr);
template void PreemptionHelper::programStateSip<GfxFamily>(LinearStream &preambleCmdStream, Device &device);
template size_t PreemptionHelper::getRequiredStateSipCmdSize<GfxFamily>(const Device &device);
template size_t PreemptionHelper::getRequiredCmdStreamSize<GfxFamily>(PreemptionMode newPreemptionMode, PreemptionMode oldPreemptionMode);
template <>
void PreemptionHelper::programInterfaceDescriptorDataPreemption<GfxFamily>(INTERFACE_DESCRIPTOR_DATA<GfxFamily> *idd, PreemptionMode preemptionMode) {
using INTERFACE_DESCRIPTOR_DATA = typename GfxFamily::INTERFACE_DESCRIPTOR_DATA;
if (preemptionMode == PreemptionMode::MidThread) {
idd->setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE);
} else {
idd->setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE);
}
}
} // namespace NEO

View File

@ -1,27 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/helpers/preamble.h"
namespace NEO {
struct CNLFamily;
template <>
struct L3CNTLREGConfig<IGFX_CANNONLAKE> {
static const uint32_t valueForSLM = 0xA0000321u;
static const uint32_t valueForNoSLM = 0xc0000340u;
};
template <>
struct L3CNTLRegisterOffset<CNLFamily> {
static const uint32_t registerOffset = 0x7034;
};
const uint32_t gen10HdcModeRegisterAddresss = 0xE5F0;
} // namespace NEO

View File

@ -1,19 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/sampler/sampler.h"
#include "runtime/sampler/sampler.inl"
#include "hw_cmds.h"
namespace NEO {
typedef CNLFamily Family;
static auto gfxCore = IGFX_GEN10_CORE;
#include "runtime/sampler/sampler_factory_init.inl"
} // namespace NEO

View File

@ -1,147 +0,0 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#define SCHEDULER_COMPILATION_SIZE 8
#define SIZEOF_INTERFACE_DESCRIPTOR_DATA_G10 32
#define NUMBER_OF_INERFACE_DESCRIPTORS 64
#define IDT_BREAKDOWN (NUMBER_OF_INERFACE_DESCRIPTORS - 2)
#define MAX_WKG_SIZE 448
#define INTERFACE_DESCRIPTOR_TABLE_SIZE_G10 (NUMBER_OF_INERFACE_DESCRIPTORS * SIZEOF_INTERFACE_DESCRIPTOR_DATA_G10)
#define SIZEOF_COLOR_CALCULATOR_STATE_G10 0xC0
#define INTERFACE_DESCRIPTOR_TABLE_START_ADDRESS_G10 SIZEOF_COLOR_CALCULATOR_STATE_G10
#define OCLRT_SIZEOF_SAMPLER_STATE_G10 (16)
#define SIZEOF_COLOR_CALCULATOR_STATE SIZEOF_COLOR_CALCULATOR_STATE_G10
#define SIZEOF_INTERFACE_DESCRIPTOR_DATA SIZEOF_INTERFACE_DESCRIPTOR_DATA_G10
#define INTERFACE_DESCRIPTOR_TABLE_SIZE INTERFACE_DESCRIPTOR_TABLE_SIZE_G10
#define INTERFACE_DESCRIPTOR_TABLE_START_ADDRESS INTERFACE_DESCRIPTOR_TABLE_START_ADDRESS_G10
#define OCLRT_SIZEOF_SAMPLER_STATE OCLRT_SIZEOF_SAMPLER_STATE_G10
#define SECOND_LEVEL_BUFFER_SPACE_FOR_EACH_ENQUEUE (SECOND_LEVEL_BUFFER_SPACE_FOR_EACH_ENQUEUE_GEN10)
#define SECOND_LEVEL_BUFFER_NUMBER_OF_ENQUEUES (SECOND_LEVEL_BUFFER_NUMBER_OF_ENQUEUES_GEN10)
#define OCLRT_MEDIA_VFE_STATE_OFFSET (0)
//address is QWORD in size and starts on DWORD 1
#define MEDIA_VFE_STATE_ADDRESS_OFFSET (OCLRT_MEDIA_VFE_STATE_OFFSET + 1)
// DWORD OFFSET
#define MEDIA_STATE_FLUSH_INITIAL_OFFSET 0
//bits 0-5 of 1st DWORD
#define MEDIA_STATE_FLUSH_INITIAL_INTERFACE_DESCRIPTOR_OFFSET (MEDIA_STATE_FLUSH_INITIAL_OFFSET + 1)
#define MI_ARB_CHECK_AFTER_MEDIA_STATE_FLUSH_INITIAL_OFFSET 0
#define MI_ATOMIC_CMD_OFFSET 0
#define MEDIA_INTERFACE_DESCRIPTOR_LOAD_OFFSET (MEDIA_STATE_FLUSH_INITIAL_OFFSET + OCLRT_SIZEOF_MSFLUSH_DWORD)
// DWORD OFFSET of InterfaceDescriptor Length
// bits 0 - 16
#define MEDIA_INTERFACE_DESCRIPTOR_LOAD_INTERFACEDESCRIPTORLENGTH_OFFSET (MEDIA_INTERFACE_DESCRIPTOR_LOAD_OFFSET + 2)
// DWORD OFFSET of Interface Descriptor Start Address
#define MEDIA_INTERFACE_DESCRIPTOR_LOAD_INTERFACEDESCRIPTORSTARTADDRESS_OFFSET (MEDIA_INTERFACE_DESCRIPTOR_LOAD_OFFSET + 3)
#define PIPE_CONTROL_FOR_TIMESTAMP_START_OFFSET (MEDIA_INTERFACE_DESCRIPTOR_LOAD_OFFSET + OCLRT_SIZEOF_MEDIA_INTERFACE_DESCRIPTOR_LOAD_DEVICE_CMD_DWORD_OFFSET)
#define INTERFACE_DESCRIPTOR_SAMPLER_STATE_TABLE_DWORD 3
#define INTERFACE_DESCRIPTOR_BINDING_TABLE_POINTER_DWORD 4
#define INTERFACE_DESCRIPTOR_CONSTANT_URB_ENTRY_READ_OFFSET 5
#define INTERFACE_DESCRIPTOR_HWTHREADS_NUMBER_DWORD 6
#define INTERFACE_DESCRIPTOR_SLMSIZE_DWORD 6
#define INTERFACE_DESCRIPTOR_HWTHREADS_UPPER_BIT 9
#define SAMPLER_STATE_INDIRECT_STATE_MASK (0x7FFFFC0)
#define SAMPLER_STATE_BORDER_COLOR_MASK (0xFFFFFFE0)
#define SAMPLER_STATE_DESCRIPTOR_BORDER_COLOR_POINTER_DWORD 2
#define GPGPU_WALKER_OFFSET (PIPE_CONTROL_FOR_TIMESTAMP_START_OFFSET + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G10_DWORD_OFFSET)
// DWORD OFFSET of the Interface Descriptor Offset for GPGPU_WALKER
// bits 0 - 5
#define GPGPU_WALKER_INTERFACE_DESCRIPTOR_ID_OFFSET (GPGPU_WALKER_OFFSET + 1)
// DWORD OFFSET of the Indirect data length Offset for GPGPU_WALKER
// bits 0 - 16
#define GPGPU_WALKER_INDIRECT_DATA_LENGTH_OFFSET (GPGPU_WALKER_OFFSET + 2)
// DWORD OFFSET of the Indirect Start Address for GPGPU_WALKER
#define GPGPU_WALKER_INDIRECT_START_ADDRESS_OFFSET (GPGPU_WALKER_OFFSET + 3)
// DWORD OFFSET of the Thread Width Counter Maximum for GPGPU_WALKER
// bits 0 - 5
#define GPGPU_WALKER_THREAD_WIDTH_DWORD (GPGPU_WALKER_OFFSET + 4)
// DWORD OFFSET of the Thread Height Counter Maximum for GPGPU_WALKER
// bits 8 - 13
#define GPGPU_WALKER_THREAD_HEIGHT_DWORD (GPGPU_WALKER_OFFSET + 4)
// DWORD OFFSET of the Thread Depth Counter Maximum for GPGPU_WALKER
// bits 16 - 21
#define GPGPU_WALKER_THREAD_DEPTH_DWORD (GPGPU_WALKER_OFFSET + 4)
// DWORD OFFSET of the SIMD Size for GPGPU_WALKER
// bits 30 - 31
#define GPGPU_WALKER_SIMDSIZE_DWORD (GPGPU_WALKER_OFFSET + 4)
// DWORD OFFSET of the Starting in X pos for GPGPU_WALKER
//bits 0 - 31
#define GPGPU_WALKER_GROUP_ID_START_X (GPGPU_WALKER_OFFSET + 5)
// DWORD OFFSET of the X Dimension for GPGPU_WALKER
#define GPGPU_WALKER_XDIM_DWORD (GPGPU_WALKER_OFFSET + 7)
// DWORD OFFSET of the Starting in Y pos for GPGPU_WALKER
//bits 0 - 31
#define GPGPU_WALKER_GROUP_ID_START_Y (GPGPU_WALKER_OFFSET + 8)
// DWORD OFFSET of the Y Dimension for GPGPU_WALKER
#define GPGPU_WALKER_YDIM_DWORD (GPGPU_WALKER_OFFSET + 10)
// DWORD OFFSET of the Starting in Z pos for GPGPU_WALKER
//bits 0 - 31
#define GPGPU_WALKER_GROUP_ID_START_Z (GPGPU_WALKER_OFFSET + 11)
// DWORD OFFSET of the X Dimension for GPGPU_WALKER
#define GPGPU_WALKER_ZDIM_DWORD (GPGPU_WALKER_OFFSET + 12)
// DWORD OFFSET of the Right or X Mask for GPGPU_WALKER
#define GPGPU_WALKER_XMASK_DWORD (GPGPU_WALKER_OFFSET + 13)
// DWORD OFFSET of the Bottom or Y Mask for GPGPU_WALKER
#define GPGPU_WALKER_YMASK_DWORD (GPGPU_WALKER_OFFSET + 14)
#define MEDIA_STATE_FLUSH_OFFSET (GPGPU_WALKER_OFFSET + OCLRT_GPGPU_WALKER_CMD_DEVICE_CMD_G10_DWORD_OFFSET)
//bits 0-5 of 1st DWORD of M_S_F command
#define MEDIA_STATE_FLUSH_INTERFACE_DESCRIPTOR_OFFSET (MEDIA_STATE_FLUSH_OFFSET + 1)
#define PIPE_CONTROL_FOR_TIMESTAMP_END_OFFSET (MEDIA_STATE_FLUSH_OFFSET + OCLRT_SIZEOF_MSFLUSH_DWORD)
#define PIPE_CONTROL_FOR_TIMESTAMP_END_OFFSET_TO_PATCH (PIPE_CONTROL_FOR_TIMESTAMP_END_OFFSET)
#define PIPE_CONTROL_POST_SYNC_DWORD 1
#define PIPE_CONTROL_POST_SYNC_START_BIT 14
#define PIPE_CONTROL_POST_SYNC_END_BIT 15
#define PIPE_CONTROL_GENERATE_TIME_STAMP 3
#define PIPE_CONTROL_NO_POSTSYNC_OPERATION 0
#define PIPE_CONTROL_ADDRESS_FIELD_DWORD 2
#define PIPE_CONTROL_PROFILING_START_TIMESTAMP_ADDRESS_OFFSET (PIPE_CONTROL_FOR_TIMESTAMP_START_OFFSET + PIPE_CONTROL_ADDRESS_FIELD_DWORD) //DWORD 2
#define PIPE_CONTROL_GRAPHICS_ADDRESS_START_BIT 2
#define PIPE_CONTROL_GRAPHICS_ADDRESS_END_BIT 31
#define PIPE_CONTROL_GRAPHICS_ADDRESS_HIGH_START_BIT 0
#define PIPE_CONTROL_GRAPHICS_ADDRESS_HIGH_END_BIT 15
#define PIPE_CONTROL_TIME_STAMP_DWORD0 0x7A000004
#define PIPE_CONTROL_TIME_STAMP_DWORD1 0x0010C4A4
#define PIPE_CONTROL_CSTALL_DWORD0 0x7A000004
#define PIPE_CONTROL_CSTALL_DWORD1 0x001004A4
#define PIPE_CONTROL_TAG_WRITE_DWORD0 0x7A000004
#define PIPE_CONTROL_TAG_WRITE_DWORD1 0x001044A4
// the value of g_cInitMiBatchBufferStartCmdG10 DWORD0
#define OCLRT_BATCH_BUFFER_BEGIN_CMD_DWORD0 (0x18800101)
#if defined WA_LRI_COMMANDS_EXIST
#define IMM_LOAD_REGISTER_FOR_ENABLE_PREEMPTION_OFFSET (PIPE_CONTROL_FOR_TIMESTAMP_END_OFFSET + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G10_DWORD_OFFSET + OCLRT_PIPE_CONTROL_CMD_DEVICE_CMD_G10_DWORD_OFFSET)
#endif
#define OCLRT_LOAD_REGISTER_IMM_CMD 0x11000001
#define CTXT_PREMP_DBG_ADDRESS_VALUE 0x2248
#define CTXT_PREMP_ON_MI_ARB_CHECK_ONLY 0x00000100
#define CTXT_PREMP_DEFAULT_VALUE 0x0
#define IMM_LOAD_REGISTER_ADDRESS_DWORD_OFFSET 1
#define IMM_LOAD_REGISTER_VALUE_DWORD_OFFSET 2

View File

@ -1,91 +0,0 @@
/*
* Copyright (C) 2017-2018 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
uint GetPatchValueForSLMSize(uint slMsize) {
//todo: veryfy this optimization :
//return ( SLMSize == 0 ) ? 0 : max( 33 - clz( ( SLMSize - 1 ) >> 10 ), 7 );
uint PatchValue = 0;
if (slMsize == 0) {
PatchValue = 0;
} else if (slMsize <= (1 * 1024)) {
PatchValue = 1;
} else if (slMsize <= (2 * 1024)) {
PatchValue = 2;
} else if (slMsize <= (4 * 1024)) {
PatchValue = 3;
} else if (slMsize <= (8 * 1024)) {
PatchValue = 4;
} else if (slMsize <= (16 * 1024)) {
PatchValue = 5;
} else if (slMsize <= (32 * 1024)) {
PatchValue = 6;
} else if (slMsize <= (64 * 1024)) {
PatchValue = 7;
}
return PatchValue;
}
//on SKL we have pipe control in pairs, therefore when we NOOP we need to do this for both pipe controls
void NOOPCSStallPipeControl(__global uint *secondaryBatchBuffer, uint dwordOffset, uint pipeControlOffset) {
dwordOffset += pipeControlOffset;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
}
//on SKL+ with mid thread preemption we need to have 2 pipe controls instead of 1 any time we do post sync operation
void PutCSStallPipeControl(__global uint *secondaryBatchBuffer, uint dwordOffset, uint pipeControlOffset) {
dwordOffset += pipeControlOffset;
//first pipe control doing CS stall
secondaryBatchBuffer[dwordOffset] = PIPE_CONTROL_CSTALL_DWORD0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = PIPE_CONTROL_CSTALL_DWORD1;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
//second pipe control , doing actual timestamp write
secondaryBatchBuffer[dwordOffset] = PIPE_CONTROL_CSTALL_DWORD0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = PIPE_CONTROL_CSTALL_DWORD1;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
secondaryBatchBuffer[dwordOffset] = 0;
dwordOffset++;
}

View File

@ -1,13 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/state_base_address.h"
#include "runtime/helpers/state_base_address_bdw_plus.inl"
namespace NEO {
template struct StateBaseAddressHelper<CNLFamily>;
}

View File

@ -1,29 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/command_stream_receiver_with_aub_dump.inl"
#include "runtime/command_stream/tbx_command_stream_receiver_hw.h"
#include "runtime/command_stream/tbx_command_stream_receiver_hw.inl"
#include "runtime/helpers/array_count.h"
#include "runtime/helpers/base_object.h"
#include "hw_cmds.h"
namespace NEO {
typedef CNLFamily Family;
static auto gfxCore = IGFX_GEN10_CORE;
template <>
void populateFactoryTable<TbxCommandStreamReceiverHw<Family>>() {
extern TbxCommandStreamReceiverCreateFunc tbxCommandStreamReceiverFactory[IGFX_MAX_CORE];
UNRECOVERABLE_IF(!isInRange(gfxCore, tbxCommandStreamReceiverFactory));
tbxCommandStreamReceiverFactory[gfxCore] = TbxCommandStreamReceiverHw<Family>::create;
}
template class TbxCommandStreamReceiverHw<Family>;
template class CommandStreamReceiverWithAUBDump<TbxCommandStreamReceiverHw<Family>>;
} // namespace NEO

View File

@ -1,17 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/command_stream_receiver_with_aub_dump.inl"
#include "runtime/os_interface/windows/device_command_stream.inl"
#include "runtime/os_interface/windows/wddm_device_command_stream.inl"
namespace NEO {
template class DeviceCommandStreamReceiver<CNLFamily>;
template class WddmCommandStreamReceiver<CNLFamily>;
template class CommandStreamReceiverWithAUBDump<WddmCommandStreamReceiver<CNLFamily>>;
} // namespace NEO

View File

@ -1,16 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/gmm_callbacks.h"
#include "runtime/helpers/gmm_callbacks.inl"
#include "hw_cmds.h"
using namespace NEO;
template struct DeviceCallbacks<CNLFamily>;
template struct TTCallbacks<CNLFamily>;

View File

@ -1,23 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/hw_info.h"
#include "runtime/os_interface/hw_info_config.h"
#include "runtime/os_interface/hw_info_config.inl"
namespace NEO {
#ifdef SUPPORT_CNL
template <>
int HwInfoConfigHw<IGFX_CANNONLAKE>::configureHardwareCustom(HardwareInfo *hwInfo, OSInterface *osIface) {
return 0;
}
template class HwInfoConfigHw<IGFX_CANNONLAKE>;
#endif
} // namespace NEO

View File

@ -12,9 +12,6 @@
#ifdef SUPPORT_GEN9
#include "runtime/gen9/aub_mapper.h"
#endif
#ifdef SUPPORT_GEN10
#include "runtime/gen10/aub_mapper.h"
#endif
#ifdef SUPPORT_GEN11
#include "runtime/gen11/aub_mapper.h"
#endif

View File

@ -12,9 +12,6 @@
#ifdef SUPPORT_GEN9
#include "runtime/gen9/hw_cmds.h"
#endif
#ifdef SUPPORT_GEN10
#include "runtime/gen10/hw_cmds.h"
#endif
#ifdef SUPPORT_GEN11
#include "runtime/gen11/hw_cmds.h"
#endif

View File

@ -12,9 +12,6 @@
#ifdef SUPPORT_GEN9
#include "runtime/gen9/reg_configs.h"
#endif
#ifdef SUPPORT_GEN10
#include "runtime/gen10/reg_configs.h"
#endif
#ifdef SUPPORT_GEN11
#include "runtime/gen11/reg_configs.h"
#endif

View File

@ -8,7 +8,7 @@ RUN apt-get -y update ; apt-get install -y --allow-unauthenticated gpg; \
apt-get -y update ; apt-get install -y --allow-unauthenticated cmake g++-7 git pkg-config ninja-build intel-igc-opencl-dev intel-gmmlib-dev
RUN mkdir /root/build; cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 \
-DSUPPORT_GEN9=0 -DSUPPORT_GEN10=0 \
-DSUPPORT_GEN9=0 \
-DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 \
../neo; \
ninja -j `nproc`

View File

@ -8,7 +8,7 @@ RUN apt-get -y update ; apt-get install -y --allow-unauthenticated gpg; \
apt-get -y update ; apt-get install -y --allow-unauthenticated cmake g++-7 git pkg-config ninja-build intel-igc-opencl-dev intel-gmmlib-dev
RUN mkdir /root/build; cd /root/build ; cmake -G Ninja -DBUILD_TYPE=Release -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 \
-DSUPPORT_GEN8=0 -DSUPPORT_GEN10=0 \
-DSUPPORT_GEN8=0 \
-DDO_NOT_RUN_AUB_TESTS=1 -DDONT_CARE_OF_VIRTUALS=1 \
../neo; \
ninja -j `nproc`

View File

@ -1,14 +0,0 @@
#
# Copyright (C) 2017-2019 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(TESTS_GEN10)
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/aub_tests_configuration_gen10.cpp
${IGDRCL_SOURCE_DIR}/unit_tests/gen10/unit_test_helper_gen10.cpp
)
add_subdirectories()
endif()

View File

@ -1,13 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/gen_common/hw_cmds.h"
#include "unit_tests/aub_tests/aub_tests_configuration.inl"
using namespace NEO;
template AubTestsConfig GetAubTestsConfig<CNLFamily>();

View File

@ -1,11 +0,0 @@
#
# Copyright (C) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/aub_batch_buffer_tests_gen10.h
${CMAKE_CURRENT_SOURCE_DIR}/aub_batch_buffer_tests_gen10.cpp
)

View File

@ -1,18 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "aub_batch_buffer_tests_gen10.h"
#include "unit_tests/fixtures/device_fixture.h"
using Gen10AubBatchBufferTests = Test<NEO::DeviceFixture>;
static constexpr auto gpuBatchBufferAddr = 0x800400001000; // 48-bit GPU address
GEN10TEST_F(Gen10AubBatchBufferTests, givenSimpleRCSWithBatchBufferWhenItHasMSBSetInGpuAddressThenAUBShouldBeSetupSuccessfully) {
setupAUBWithBatchBuffer<FamilyType>(pDevice, aub_stream::ENGINE_RCS, gpuBatchBufferAddr);
}

View File

@ -1,158 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include "runtime/aub/aub_helper.h"
#include "unit_tests/aub_tests/command_stream/aub_mem_dump_tests.h"
template <typename FamilyType>
void setupAUBWithBatchBuffer(const NEO::Device *pDevice, aub_stream::EngineType engineType, uint64_t gpuBatchBufferAddr) {
typedef typename NEO::AUBFamilyMapper<FamilyType>::AUB AUB;
const auto &csTraits = NEO::AUBCommandStreamReceiverHw<FamilyType>::getCsTraits(engineType);
auto mmioBase = csTraits.mmioBase;
uint64_t physAddress = 0x10000;
NEO::AUBCommandStreamReceiver::AubFileStream aubFile;
std::string filePath(NEO::folderAUB);
filePath.append(Os::fileSeparator);
std::string baseName("simple");
baseName.append(csTraits.name);
baseName.append("WithBatchBuffer");
baseName.append(".aub");
filePath.append(getAubFileName(pDevice, baseName));
aubFile.fileHandle.open(filePath.c_str(), std::ofstream::binary);
// Header
aubFile.init(AubMemDump::SteppingValues::A, AUB::Traits::device);
aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x229c), 0xffff8280);
const size_t sizeHWSP = 0x1000;
const size_t alignHWSP = 0x1000;
auto pGlobalHWStatusPage = alignedMalloc(sizeHWSP, alignHWSP);
uint32_t ggttGlobalHardwareStatusPage = (uint32_t)((uintptr_t)pGlobalHWStatusPage);
AubGTTData data = {true, false};
AUB::reserveAddressGGTT(aubFile, ggttGlobalHardwareStatusPage, sizeHWSP, physAddress, data);
physAddress += sizeHWSP;
aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2080), ggttGlobalHardwareStatusPage);
using MI_NOOP = typename FamilyType::MI_NOOP;
using MI_BATCH_BUFFER_START = typename FamilyType::MI_BATCH_BUFFER_START;
using MI_BATCH_BUFFER_END = typename FamilyType::MI_BATCH_BUFFER_END;
// create a user mode batch buffer
auto physBatchBuffer = physAddress;
const auto sizeBatchBuffer = 0x1000;
auto gpuBatchBuffer = static_cast<uintptr_t>(gpuBatchBufferAddr);
physAddress += sizeBatchBuffer;
NEO::AubHelperHw<FamilyType> aubHelperHw(false);
AUB::reserveAddressPPGTT(aubFile, gpuBatchBuffer, sizeBatchBuffer, physBatchBuffer, 7, aubHelperHw);
uint8_t batchBuffer[sizeBatchBuffer];
auto noop = MI_NOOP::sInit();
uint32_t noopId = 0xbaadd;
{
auto pBatchBuffer = (void *)batchBuffer;
*(MI_NOOP *)pBatchBuffer = noop;
pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP));
*(MI_NOOP *)pBatchBuffer = noop;
pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP));
*(MI_NOOP *)pBatchBuffer = noop;
pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP));
noop.TheStructure.Common.IdentificationNumberRegisterWriteEnable = true;
noop.TheStructure.Common.IdentificationNumber = noopId++;
*(MI_NOOP *)pBatchBuffer = noop;
pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_NOOP));
*(MI_BATCH_BUFFER_END *)pBatchBuffer = MI_BATCH_BUFFER_END::sInit();
pBatchBuffer = ptrOffset(pBatchBuffer, sizeof(MI_BATCH_BUFFER_END));
auto sizeBufferUsed = ptrDiff(pBatchBuffer, batchBuffer);
AUB::addMemoryWrite(aubFile, physBatchBuffer, batchBuffer, sizeBufferUsed, AubMemDump::AddressSpaceValues::TraceNonlocal, AubMemDump::DataTypeHintValues::TraceBatchBuffer);
}
const size_t sizeRing = 0x4 * 0x1000;
const size_t alignRing = 0x1000;
size_t sizeCommands = 0;
auto pRing = alignedMalloc(sizeRing, alignRing);
auto ggttRing = (uint32_t)(uintptr_t)pRing;
auto physRing = physAddress;
physAddress += sizeRing;
auto rRing = AUB::reserveAddressGGTT(aubFile, ggttRing, sizeRing, physRing, data);
ASSERT_NE(static_cast<uint64_t>(-1), rRing);
EXPECT_EQ(rRing, physRing);
auto cur = (uint32_t *)pRing;
auto bbs = MI_BATCH_BUFFER_START::sInit();
bbs.setBatchBufferStartAddressGraphicsaddress472(gpuBatchBuffer);
bbs.setAddressSpaceIndicator(MI_BATCH_BUFFER_START::ADDRESS_SPACE_INDICATOR_PPGTT);
*(MI_BATCH_BUFFER_START *)cur = bbs;
cur = ptrOffset(cur, sizeof(MI_BATCH_BUFFER_START));
noop.TheStructure.Common.IdentificationNumberRegisterWriteEnable = true;
noop.TheStructure.Common.IdentificationNumber = noopId;
*cur++ = noop.TheStructure.RawData[0];
sizeCommands = ptrDiff(cur, pRing);
AUB::addMemoryWrite(aubFile, physRing, pRing, sizeCommands, AubMemDump::AddressSpaceValues::TraceNonlocal, csTraits.aubHintCommandBuffer);
auto sizeLRCA = csTraits.sizeLRCA;
auto pLRCABase = alignedMalloc(csTraits.sizeLRCA, csTraits.alignLRCA);
csTraits.initialize(pLRCABase);
csTraits.setRingHead(pLRCABase, 0x0000);
csTraits.setRingTail(pLRCABase, static_cast<uint32_t>(sizeCommands));
csTraits.setRingBase(pLRCABase, ggttRing);
auto ringCtrl = static_cast<uint32_t>((sizeRing - 0x1000) | 1);
csTraits.setRingCtrl(pLRCABase, ringCtrl);
auto ggttLRCA = static_cast<uint32_t>(reinterpret_cast<uintptr_t>(pLRCABase));
auto physLRCA = physAddress;
physAddress += sizeLRCA;
AUB::reserveAddressGGTT(aubFile, ggttLRCA, sizeLRCA, physLRCA, data);
AUB::addMemoryWrite(aubFile, physLRCA, pLRCABase, sizeLRCA, AubMemDump::AddressSpaceValues::TraceNonlocal, csTraits.aubHintLRCA);
typename AUB::MiContextDescriptorReg contextDescriptor = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}};
contextDescriptor.sData.Valid = true;
contextDescriptor.sData.ForcePageDirRestore = false;
contextDescriptor.sData.ForceRestore = false;
contextDescriptor.sData.Legacy = true;
contextDescriptor.sData.FaultSupport = 0;
contextDescriptor.sData.PrivilegeAccessOrPPGTT = true;
contextDescriptor.sData.ADor64bitSupport = AUB::Traits::addressingBits > 32;
contextDescriptor.sData.LogicalRingCtxAddress = (uintptr_t)pLRCABase / 4096;
contextDescriptor.sData.ContextID = 0;
// Submit our exec-list
aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2230), 0);
aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2230), 0);
aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2230), contextDescriptor.ulData[1]);
aubFile.writeMMIO(AubMemDump::computeRegisterOffset(mmioBase, 0x2230), contextDescriptor.ulData[0]);
// Poll until HW complete
using AubMemDump::CmdServicesMemTraceRegisterPoll;
aubFile.registerPoll(
AubMemDump::computeRegisterOffset(mmioBase, 0x2234), //EXECLIST_STATUS
0x100,
0x100,
false,
CmdServicesMemTraceRegisterPoll::TimeoutActionValues::Abort);
alignedFree(pRing);
alignedFree(pLRCABase);
alignedFree(pGlobalHWStatusPage);
aubFile.fileHandle.close();
}

View File

@ -1,10 +0,0 @@
#
# Copyright (C) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
target_sources(igdrcl_aub_tests PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_parent_kernel_tests_gen10.cpp
)

View File

@ -1,114 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/built_ins/built_ins.h"
#include "runtime/mem_obj/image.h"
#include "runtime/sampler/sampler.h"
#include "test.h"
#include "unit_tests/aub_tests/fixtures/aub_parent_kernel_fixture.h"
#include "unit_tests/fixtures/buffer_fixture.h"
using namespace NEO;
typedef AUBParentKernelFixture GEN10AUBParentKernelFixture;
GEN10TEST_F(GEN10AUBParentKernelFixture, DISABLED_EnqueueParentKernel) {
if (pDevice->getSupportedClVersion() >= 20) {
ASSERT_NE(nullptr, pKernel);
ASSERT_TRUE(pKernel->isParentKernel);
const cl_queue_properties properties[3] = {(CL_QUEUE_ON_DEVICE | CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE),
0, 0};
DeviceQueue *devQueue = DeviceQueue::create(
&pCmdQ->getContext(),
pDevice,
properties[0],
retVal);
auto &builtIns = *pDevice->getExecutionEnvironment()->getBuiltIns();
SchedulerKernel &scheduler = builtIns.getSchedulerKernel(pCmdQ->getContext());
// Aub execution takes huge time for bigger GWS
scheduler.setGws(24);
size_t offset[3] = {0, 0, 0};
size_t gws[3] = {1, 1, 1};
size_t lws[3] = {1, 1, 1};
// clang-format off
cl_image_format imageFormat;
imageFormat.image_channel_data_type = CL_UNSIGNED_INT8;
imageFormat.image_channel_order = CL_R;
cl_image_desc desc = { 0 };
desc.image_array_size = 0;
desc.image_depth = 1;
desc.image_height = 4;
desc.image_width = 4;
desc.image_type = CL_MEM_OBJECT_IMAGE3D;
desc.image_row_pitch = 0;
desc.image_slice_pitch = 0;
// clang-format on
auto surfaceFormat = Image::getSurfaceFormatFromTable(0, &imageFormat);
Image *image = Image::create(
pContext,
0,
surfaceFormat,
&desc,
nullptr,
retVal);
Buffer *buffer = BufferHelper<BufferUseHostPtr<>>::create(pContext);
cl_mem bufferMem = buffer;
cl_mem imageMem = image;
auto sampler = Sampler::create(
pContext,
CL_TRUE,
CL_ADDRESS_NONE,
CL_FILTER_LINEAR,
retVal);
uint64_t argScalar = 2;
pKernel->setArg(
3,
sizeof(uint64_t),
&argScalar);
pKernel->setArg(
2,
sizeof(cl_mem),
&bufferMem);
pKernel->setArg(
1,
sizeof(cl_mem),
&imageMem);
pKernel->setArg(
0,
sizeof(cl_sampler),
&sampler);
pCmdQ->enqueueKernel(pKernel, 1, offset, gws, lws, 0, 0, 0);
pCmdQ->finish(false);
uint32_t expectedNumberOfEnqueues = 1;
uint64_t gpuAddress = devQueue->getQueueBuffer()->getGpuAddress() + offsetof(IGIL_CommandQueue, m_controls.m_TotalNumberOfQueues);
AUBCommandStreamFixture::expectMemory<FamilyType>((void *)(uintptr_t)gpuAddress, &expectedNumberOfEnqueues, sizeof(uint32_t));
AUBCommandStreamFixture::expectMemory<FamilyType>((void *)(uintptr_t)buffer->getGraphicsAllocation()->getGpuAddress(), &argScalar, sizeof(size_t));
delete devQueue;
delete image;
delete buffer;
delete sampler;
}
}

View File

@ -1,31 +0,0 @@
#
# Copyright (C) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
if(TESTS_GEN10)
set(IGDRCL_SRCS_tests_gen10
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/coherency_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/command_stream_receiver_hw_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_kernel_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/enqueue_media_kernel_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_helper_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/image_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/kernel_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/preamble_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/sampler_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/scheduler_source_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_device_caps_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_device_queue_hw_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_hw_info_config_cnl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_platform_caps_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_preamble_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_preemption_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/test_sample_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/unit_test_helper_gen10.cpp
)
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen10})
add_subdirectories()
endif()

View File

@ -1,89 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/gen_common/gen_cmd_parse.h"
#include "gtest/gtest.h"
using GenStruct = NEO::GEN10;
using GenGfxFamily = NEO::CNLFamily;
#include "unit_tests/gen_common/cmd_parse_base.inl"
#include "unit_tests/gen_common/cmd_parse_base_mi_arb.inl"
#include "unit_tests/gen_common/cmd_parse_gpgpu_walker.inl"
#include "unit_tests/gen_common/cmd_parse_sip.inl"
#include "unit_tests/helpers/hw_parse.h"
#include "unit_tests/helpers/hw_parse.inl"
template <>
size_t CmdParse<GenGfxFamily>::getCommandLengthHwSpecific(void *cmd) {
{
auto pCmd = genCmdCast<GPGPU_WALKER *>(cmd);
if (pCmd)
return pCmd->TheStructure.Common.DwordLength + 2;
}
{
auto pCmd = genCmdCast<MEDIA_INTERFACE_DESCRIPTOR_LOAD *>(cmd);
if (pCmd)
return pCmd->TheStructure.Common.DwordLength + 2;
}
{
auto pCmd = genCmdCast<MEDIA_VFE_STATE *>(cmd);
if (pCmd)
return pCmd->TheStructure.Common.DwordLength + 2;
}
{
auto pCmd = genCmdCast<MEDIA_STATE_FLUSH *>(cmd);
if (pCmd)
return pCmd->TheStructure.Common.DwordLength + 2;
}
{
auto pCmd = genCmdCast<GPGPU_CSR_BASE_ADDRESS *>(cmd);
if (pCmd)
return pCmd->TheStructure.Common.DwordLength + 2;
}
{
auto pCmd = genCmdCast<STATE_SIP *>(cmd);
if (pCmd)
return pCmd->TheStructure.Common.DwordLength + 2;
}
return 0;
}
template <>
const char *CmdParse<GenGfxFamily>::getCommandNameHwSpecific(void *cmd) {
if (nullptr != genCmdCast<GPGPU_WALKER *>(cmd)) {
return "GPGPU_WALKER";
}
if (nullptr != genCmdCast<MEDIA_INTERFACE_DESCRIPTOR_LOAD *>(cmd)) {
return "MEDIA_INTERFACE_DESCRIPTOR_LOAD";
}
if (nullptr != genCmdCast<MEDIA_VFE_STATE *>(cmd)) {
return "MEDIA_VFE_STATE";
}
if (nullptr != genCmdCast<MEDIA_STATE_FLUSH *>(cmd)) {
return "MEDIA_STATE_FLUSH";
}
if (nullptr != genCmdCast<GPGPU_CSR_BASE_ADDRESS *>(cmd)) {
return "GPGPU_CSR_BASE_ADDRESS";
}
if (nullptr != genCmdCast<STATE_SIP *>(cmd)) {
return "STATE_SIP";
}
return "UNKNOWN";
}
template struct CmdParse<GenGfxFamily>;
namespace NEO {
template void HardwareParse::findHardwareCommands<CNLFamily>();
template void HardwareParse::findHardwareCommands<CNLFamily>(IndirectHeap *);
template const void *HardwareParse::getStatelessArgumentPointer<CNLFamily>(const Kernel &kernel, uint32_t indexArg, IndirectHeap &ioh);
} // namespace NEO

View File

@ -1,155 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/command_stream_receiver_hw.h"
#include "runtime/gen10/reg_configs.h"
#include "runtime/helpers/hw_helper.h"
#include "test.h"
#include "unit_tests/helpers/hw_parse.h"
#include "unit_tests/mocks/mock_device.h"
using namespace NEO;
struct Gen10CoherencyRequirements : public ::testing::Test {
typedef typename CNLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
struct myCsr : public CommandStreamReceiverHw<CNLFamily> {
using CommandStreamReceiver::commandStream;
myCsr(ExecutionEnvironment &executionEnvironment) : CommandStreamReceiverHw<CNLFamily>(executionEnvironment){};
CsrSizeRequestFlags *getCsrRequestFlags() { return &csrSizeRequestFlags; }
};
void overrideCoherencyRequest(bool requestChanged, bool requireCoherency) {
csr->getCsrRequestFlags()->coherencyRequestChanged = requestChanged;
flags.requiresCoherency = requireCoherency;
}
void SetUp() override {
device.reset(MockDevice::createWithNewExecutionEnvironment<MockDevice>(platformDevices[0]));
csr = new myCsr(*device->executionEnvironment);
device->resetCommandStreamReceiver(csr);
}
myCsr *csr = nullptr;
std::unique_ptr<MockDevice> device;
DispatchFlags flags = {};
};
GEN10TEST_F(Gen10CoherencyRequirements, coherencyCmdSize) {
auto lriSize = sizeof(MI_LOAD_REGISTER_IMM);
overrideCoherencyRequest(false, false);
auto retSize = csr->getCmdSizeForComputeMode();
EXPECT_EQ(0u, retSize);
overrideCoherencyRequest(false, true);
retSize = csr->getCmdSizeForComputeMode();
EXPECT_EQ(0u, retSize);
overrideCoherencyRequest(true, true);
retSize = csr->getCmdSizeForComputeMode();
EXPECT_EQ(lriSize, retSize);
overrideCoherencyRequest(true, false);
retSize = csr->getCmdSizeForComputeMode();
EXPECT_EQ(lriSize, retSize);
}
GEN10TEST_F(Gen10CoherencyRequirements, coherencyCmdValues) {
auto lriSize = sizeof(MI_LOAD_REGISTER_IMM);
char buff[MemoryConstants::pageSize];
LinearStream stream(buff, MemoryConstants::pageSize);
auto expectedCmd = CNLFamily::cmdInitLoadRegisterImm;
expectedCmd.setRegisterOffset(gen10HdcModeRegisterAddresss);
expectedCmd.setDataDword(DwordBuilder::build(4, true));
overrideCoherencyRequest(true, false);
csr->programComputeMode(stream, flags);
EXPECT_EQ(lriSize, stream.getUsed());
auto cmd = reinterpret_cast<MI_LOAD_REGISTER_IMM *>(stream.getCpuBase());
EXPECT_TRUE(memcmp(&expectedCmd, cmd, lriSize) == 0);
overrideCoherencyRequest(true, true);
csr->programComputeMode(stream, flags);
EXPECT_EQ(lriSize * 2, stream.getUsed());
cmd = reinterpret_cast<MI_LOAD_REGISTER_IMM *>(ptrOffset(stream.getCpuBase(), lriSize));
expectedCmd.setDataDword(DwordBuilder::build(4, true, false));
EXPECT_TRUE(memcmp(&expectedCmd, cmd, lriSize) == 0);
}
struct Gen10CoherencyProgramingTest : public Gen10CoherencyRequirements {
void SetUp() override {
Gen10CoherencyRequirements::SetUp();
startOffset = csr->commandStream.getUsed();
}
void flushTask(bool coherencyRequired) {
flags.requiresCoherency = coherencyRequired;
auto graphicAlloc = csr->getMemoryManager()->allocateGraphicsMemoryWithProperties(MockAllocationProperties{MemoryConstants::pageSize});
IndirectHeap stream(graphicAlloc);
startOffset = csr->commandStream.getUsed();
csr->flushTask(stream, 0, stream, stream, stream, 0, flags, *device);
csr->getMemoryManager()->freeGraphicsMemory(graphicAlloc);
};
void findMmio(bool expectToBeProgrammed) {
HardwareParse hwParser;
hwParser.parseCommands<CNLFamily>(csr->commandStream, startOffset);
bool foundOne = false;
for (auto it = hwParser.cmdList.begin(); it != hwParser.cmdList.end(); it++) {
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(*it);
if (cmd && cmd->getRegisterOffset() == gen10HdcModeRegisterAddresss) {
EXPECT_FALSE(foundOne);
foundOne = true;
}
}
EXPECT_EQ(expectToBeProgrammed, foundOne);
};
size_t startOffset;
};
GEN10TEST_F(Gen10CoherencyProgramingTest, givenCsrWhenFlushFirstTaskWithoutCoherencyRequiredThenProgramMmio) {
flushTask(false);
findMmio(true);
}
GEN10TEST_F(Gen10CoherencyProgramingTest, givenCsrWhenFlushFirstTaskWithCoherencyRequiredThenProgramMmio) {
flushTask(true);
findMmio(true);
}
GEN10TEST_F(Gen10CoherencyProgramingTest, givenCsrWithFlushedFirstTaskWithCoherencyRequiredWhenFlushNextTaskWithoutChangingCoherencyRequirementThenDoNotProgramMmio) {
flushTask(true);
flushTask(true);
findMmio(false);
}
GEN10TEST_F(Gen10CoherencyProgramingTest, givenCsrWithFlushedFirstTaskWithoutCoherencyRequiredWhenFlushNextTaskWithoutChangingCoherencyRequirementThenDoNotProgramMmio) {
flushTask(false);
flushTask(false);
findMmio(false);
}
GEN10TEST_F(Gen10CoherencyProgramingTest, givenCsrWithFlushedFirstTaskWithCoherencyRequiredWhenFlushNextTaskWithChangingCoherencyRequirementThenProgramMmio) {
flushTask(true);
flushTask(false);
findMmio(true);
}
GEN10TEST_F(Gen10CoherencyProgramingTest, givenCsrWithFlushedFirstTaskWithoutCoherencyRequiredWhenFlushNextTaskWithChangingCoherencyRequirementThenProgramMmio) {
flushTask(false);
flushTask(true);
findMmio(true);
}

View File

@ -1,41 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_queue/command_queue_hw.h"
#include "runtime/command_stream/command_stream_receiver.h"
#include "runtime/command_stream/linear_stream.h"
#include "test.h"
#include "unit_tests/fixtures/device_fixture.h"
#include "unit_tests/helpers/hw_parse.h"
#include "unit_tests/mocks/mock_command_queue.h"
#include "unit_tests/mocks/mock_context.h"
#include "unit_tests/mocks/mock_csr.h"
#include "unit_tests/mocks/mock_event.h"
#include "unit_tests/mocks/mock_kernel.h"
#include "gtest/gtest.h"
#include "reg_configs_common.h"
using namespace NEO;
#include "unit_tests/command_stream/command_stream_receiver_hw_tests.inl"
using CommandStreamReceiverHwTestGen10 = CommandStreamReceiverHwTest<CNLFamily>;
GEN10TEST_F(CommandStreamReceiverHwTestGen10, GivenKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3Config) {
givenKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigImpl();
}
GEN10TEST_F(CommandStreamReceiverHwTestGen10, GivenBlockedKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigAfterUnblocking) {
givenBlockedKernelWithSlmWhenPreviousNOSLML3WasSentThenProgramL3WithSLML3ConfigAfterUnblockingImpl();
}
GEN10TEST_F(CommandStreamReceiverHwTestGen10, whenProgrammingMiSemaphoreWaitThenSetRegisterPollModeMemoryPoll) {
using MI_SEMAPHORE_WAIT = typename FamilyType::MI_SEMAPHORE_WAIT;
MI_SEMAPHORE_WAIT miSemaphoreWait = FamilyType::cmdInitMiSemaphoreWait;
EXPECT_EQ(MI_SEMAPHORE_WAIT::REGISTER_POLL_MODE::REGISTER_POLL_MODE_MEMORY_POLL, miSemaphoreWait.getRegisterPollMode());
}

View File

@ -1,53 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_queue/command_queue_hw.h"
#include "test.h"
#include "unit_tests/fixtures/device_fixture.h"
#include "unit_tests/helpers/hw_parse.h"
#include "unit_tests/helpers/static_size3.h"
#include "unit_tests/mocks/mock_kernel.h"
#include "reg_configs_common.h"
namespace NEO {
using Gen10EnqueueTest = Test<DeviceFixture>;
GEN10TEST_F(Gen10EnqueueTest, givenKernelRequiringIndependentForwardProgressWhenKernelIsSubmittedThenDefaultPolicyIsProgrammed) {
MockContext mc;
CommandQueueHw<FamilyType> cmdQ{&mc, pDevice, 0};
MockKernelWithInternals mockKernel(*pDevice);
mockKernel.executionEnvironment.SubgroupIndependentForwardProgressRequired = true;
cmdQ.enqueueKernel(mockKernel.mockKernel, 1, nullptr, StatickSize3<1, 1, 1>(), nullptr, 0, nullptr, nullptr);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(cmdQ);
auto cmd = findMmioCmd<FamilyType>(hwParser.cmdList.begin(), hwParser.cmdList.end(), RowChickenReg4::address);
ASSERT_NE(nullptr, cmd);
EXPECT_EQ(RowChickenReg4::regDataForArbitrationPolicy[PreambleHelper<FamilyType>::getDefaultThreadArbitrationPolicy()], cmd->getDataDword());
EXPECT_EQ(1U, countMmio<FamilyType>(hwParser.cmdList.begin(), hwParser.cmdList.end(), RowChickenReg4::address));
}
GEN10TEST_F(Gen10EnqueueTest, givenKernelNotRequiringIndependentForwardProgressWhenKernelIsSubmittedThenAgeBasedPolicyIsProgrammed) {
MockContext mc;
CommandQueueHw<FamilyType> cmdQ{&mc, pDevice, 0};
MockKernelWithInternals mockKernel(*pDevice);
mockKernel.executionEnvironment.SubgroupIndependentForwardProgressRequired = false;
cmdQ.enqueueKernel(mockKernel.mockKernel, 1, nullptr, StatickSize3<1, 1, 1>(), nullptr, 0, nullptr, nullptr);
HardwareParse hwParser;
hwParser.parseCommands<FamilyType>(cmdQ);
auto cmd = findMmioCmd<FamilyType>(hwParser.cmdList.begin(), hwParser.cmdList.end(), RowChickenReg4::address);
ASSERT_NE(nullptr, cmd);
EXPECT_EQ(RowChickenReg4::regDataForArbitrationPolicy[ThreadArbitrationPolicy::AgeBased], cmd->getDataDword());
EXPECT_EQ(1U, countMmio<FamilyType>(hwParser.cmdList.begin(), hwParser.cmdList.end(), RowChickenReg4::address));
}
} // namespace NEO

View File

@ -1,181 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/preamble.h"
#include "test.h"
#include "unit_tests/fixtures/media_kernel_fixture.h"
using namespace NEO;
typedef MediaKernelFixture<HelloWorldFixtureFactory> MediaKernelTest;
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueBlockedVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) {
typedef typename CNLFamily::PIPELINE_SELECT PIPELINE_SELECT;
cl_uint workDim = 1;
size_t globalWorkOffset[3] = {0, 0, 0};
size_t globalWorkSize[3] = {1, 1, 1};
UserEvent userEvent(context);
cl_event blockedEvent = &userEvent;
auto retVal = pCmdQ->enqueueKernel(
pVmeKernel,
workDim,
globalWorkOffset,
globalWorkSize,
nullptr,
1,
&blockedEvent,
nullptr);
ASSERT_EQ(CL_SUCCESS, retVal);
userEvent.setStatus(CL_COMPLETE);
parseCommands<CNLFamily>(*pCmdQ);
ASSERT_NE(cmdPipelineSelect, nullptr);
auto *pCmd = genCmdCast<PIPELINE_SELECT *>(cmdPipelineSelect);
auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits;
auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU;
EXPECT_EQ(expectedMask, pCmd->getMaskBits());
EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection());
EXPECT_FALSE(pCmd->getMediaSamplerDopClockGateEnable());
}
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueBlockedNonVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) {
typedef typename CNLFamily::PIPELINE_SELECT PIPELINE_SELECT;
cl_uint workDim = 1;
size_t globalWorkOffset[3] = {0, 0, 0};
size_t globalWorkSize[3] = {1, 1, 1};
UserEvent userEvent(context);
cl_event blockedEvent = &userEvent;
auto retVal = pCmdQ->enqueueKernel(
pKernel,
workDim,
globalWorkOffset,
globalWorkSize,
nullptr,
1,
&blockedEvent,
nullptr);
ASSERT_EQ(CL_SUCCESS, retVal);
userEvent.setStatus(CL_COMPLETE);
parseCommands<CNLFamily>(*pCmdQ);
ASSERT_NE(cmdPipelineSelect, nullptr);
auto *pCmd = genCmdCast<PIPELINE_SELECT *>(cmdPipelineSelect);
auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits;
auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU;
EXPECT_EQ(expectedMask, pCmd->getMaskBits());
EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection());
EXPECT_TRUE(pCmd->getMediaSamplerDopClockGateEnable());
}
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) {
typedef typename CNLFamily::PIPELINE_SELECT PIPELINE_SELECT;
enqueueVmeKernel<CNLFamily>();
auto numCommands = getCommandsList<PIPELINE_SELECT>().size();
EXPECT_EQ(1u, numCommands);
auto pCmd = getCommand<PIPELINE_SELECT>();
auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits;
auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU;
EXPECT_EQ(expectedMask, pCmd->getMaskBits());
EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection());
EXPECT_FALSE(pCmd->getMediaSamplerDopClockGateEnable());
}
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueNonVmeKernelFirstTimeThenProgramPipelineSelectionAndMediaSampler) {
typedef typename CNLFamily::PIPELINE_SELECT PIPELINE_SELECT;
enqueueRegularKernel<CNLFamily>();
auto numCommands = getCommandsList<PIPELINE_SELECT>().size();
EXPECT_EQ(1u, numCommands);
auto pCmd = getCommand<PIPELINE_SELECT>();
auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits;
auto expectedPipelineSelection = PIPELINE_SELECT::PIPELINE_SELECTION_GPGPU;
EXPECT_EQ(expectedMask, pCmd->getMaskBits());
EXPECT_EQ(expectedPipelineSelection, pCmd->getPipelineSelection());
EXPECT_TRUE(pCmd->getMediaSamplerDopClockGateEnable());
}
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueVmeKernelTwiceThenProgramPipelineSelectOnce) {
typedef typename CNLFamily::PIPELINE_SELECT PIPELINE_SELECT;
enqueueVmeKernel<CNLFamily>();
auto numCommands = getCommandsList<PIPELINE_SELECT>().size();
EXPECT_EQ(1u, numCommands);
}
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueNonVmeKernelTwiceThenProgramPipelineSelectOnce) {
typedef typename CNLFamily::PIPELINE_SELECT PIPELINE_SELECT;
enqueueVmeKernel<CNLFamily>();
auto numCommands = getCommandsList<PIPELINE_SELECT>().size();
EXPECT_EQ(1u, numCommands);
}
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueVmeKernelAfterNonVmeKernelThenProgramPipelineSelectionAndMediaSamplerTwice) {
typedef typename CNLFamily::PIPELINE_SELECT PIPELINE_SELECT;
enqueueRegularKernel<CNLFamily>();
enqueueVmeKernel<CNLFamily>();
auto commands = getCommandsList<PIPELINE_SELECT>();
EXPECT_EQ(2u, commands.size());
auto pCmd = static_cast<PIPELINE_SELECT *>(commands.back());
auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits;
EXPECT_EQ(expectedMask, pCmd->getMaskBits());
EXPECT_FALSE(pCmd->getMediaSamplerDopClockGateEnable());
}
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueNonVmeKernelAfterVmeKernelThenProgramProgramPipelineSelectionAndMediaSamplerTwice) {
typedef typename CNLFamily::PIPELINE_SELECT PIPELINE_SELECT;
enqueueVmeKernel<CNLFamily>();
enqueueRegularKernel<CNLFamily>();
auto commands = getCommandsList<PIPELINE_SELECT>();
EXPECT_EQ(2u, commands.size());
auto pCmd = static_cast<PIPELINE_SELECT *>(commands.back());
auto expectedMask = pipelineSelectEnablePipelineSelectMaskBits | pipelineSelectMediaSamplerDopClockGateMaskBits;
EXPECT_EQ(expectedMask, pCmd->getMaskBits());
EXPECT_TRUE(pCmd->getMediaSamplerDopClockGateEnable());
}
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueVmeKernelThenVmeSubslicesConfigDoesntChangeToFalse) {
auto csr = static_cast<UltCommandStreamReceiver<FamilyType> *>(&pDevice->getCommandStreamReceiver());
csr->lastVmeSubslicesConfig = true;
enqueueVmeKernel<FamilyType>();
EXPECT_TRUE(csr->lastVmeSubslicesConfig);
}
GEN10TEST_F(MediaKernelTest, givenGen10CsrWhenEnqueueVmeKernelThenVmeSubslicesConfigDoesntChangeToTrue) {
auto csr = static_cast<UltCommandStreamReceiver<FamilyType> *>(&pDevice->getCommandStreamReceiver());
csr->lastVmeSubslicesConfig = false;
enqueueVmeKernel<FamilyType>();
EXPECT_FALSE(csr->lastVmeSubslicesConfig);
}
GEN10TEST_F(MediaKernelTest, gen10CmdSizeForVme) {
auto csr = static_cast<UltCommandStreamReceiver<FamilyType> *>(&pDevice->getCommandStreamReceiver());
csr->lastVmeSubslicesConfig = false;
EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(false));
EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(true));
csr->lastVmeSubslicesConfig = true;
EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(false));
EXPECT_EQ(0u, csr->getCmdSizeForMediaSampler(true));
}

View File

@ -1,72 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/helpers/get_gpgpu_engines_tests.inl"
#include "unit_tests/helpers/hw_helper_tests.h"
using HwHelperTestGen10 = HwHelperTest;
GEN10TEST_F(HwHelperTestGen10, getMaxBarriersPerSliceReturnsCorrectSize) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(32u, helper.getMaxBarrierRegisterPerSlice());
}
GEN10TEST_F(HwHelperTestGen10, whenCnlRevIdForStepCThenSetCapabilityCoherencyFlagFalse) {
auto &helper = HwHelper::get(renderCoreFamily);
bool coherency = true;
hardwareInfo.platform.usRevId = 0x3;
helper.setCapabilityCoherencyFlag(&hardwareInfo, coherency);
EXPECT_FALSE(coherency);
}
GEN10TEST_F(HwHelperTestGen10, whenCnlRevIdForStepDThenSetCapabilityCoherencyFlagTrue) {
auto &helper = HwHelper::get(renderCoreFamily);
bool coherency = false;
hardwareInfo.platform.usRevId = 0x4;
helper.setCapabilityCoherencyFlag(&hardwareInfo, coherency);
EXPECT_TRUE(coherency);
}
GEN10TEST_F(HwHelperTestGen10, setupPreemptionRegisters) {
auto &helper = HwHelper::get(renderCoreFamily);
bool preemption = false;
preemption = helper.setupPreemptionRegisters(&hardwareInfo, preemption);
EXPECT_FALSE(preemption);
EXPECT_FALSE(hardwareInfo.capabilityTable.whitelistedRegisters.csChicken1_0x2580);
preemption = true;
preemption = helper.setupPreemptionRegisters(&hardwareInfo, preemption);
EXPECT_TRUE(preemption);
EXPECT_TRUE(hardwareInfo.capabilityTable.whitelistedRegisters.csChicken1_0x2580);
}
GEN10TEST_F(HwHelperTestGen10, adjustDefaultEngineType) {
auto engineType = hardwareInfo.capabilityTable.defaultEngineType;
auto &helper = HwHelper::get(renderCoreFamily);
helper.adjustDefaultEngineType(&hardwareInfo);
EXPECT_EQ(engineType, hardwareInfo.capabilityTable.defaultEngineType);
}
GEN10TEST_F(HwHelperTestGen10, givenGen10PlatformWhenSetupHardwareCapabilitiesIsCalledThenDefaultImplementationIsUsed) {
auto &helper = HwHelper::get(renderCoreFamily);
// Test default method implementation
testDefaultImplementationOfSetupHardwareCapabilities(helper, hardwareInfo);
}
GEN10TEST_F(HwHelperTestGen10, whenGetConfigureAddressSpaceModeThenReturnZero) {
auto &helper = HwHelper::get(renderCoreFamily);
EXPECT_EQ(0u, helper.getConfigureAddressSpaceMode());
}
GEN10TEST_F(HwHelperTestGen10, whenGetGpgpuEnginesThenReturnTwoRcsEngines) {
whenGetGpgpuEnginesThenReturnTwoRcsEngines<FamilyType>();
EXPECT_EQ(2u, pDevice->getExecutionEnvironment()->commandStreamReceivers[0].size());
}

View File

@ -1,44 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "test.h"
#include "unit_tests/fixtures/image_fixture.h"
#include "unit_tests/mocks/mock_context.h"
using namespace NEO;
typedef ::testing::Test gen10ImageTests;
GEN10TEST_F(gen10ImageTests, appendSurfaceStateParamsDoesNothing) {
typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
MockContext context;
auto image = std::unique_ptr<Image>(ImageHelper<Image1dDefaults>::create(&context));
auto surfaceStateBefore = FamilyType::cmdInitRenderSurfaceState;
auto surfaceStateAfter = FamilyType::cmdInitRenderSurfaceState;
auto imageHw = static_cast<ImageHw<FamilyType> *>(image.get());
EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE)));
imageHw->appendSurfaceStateParams(&surfaceStateAfter);
EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE)));
}
GEN10TEST_F(gen10ImageTests, givenImageForGen10WhenClearColorParametersAreSetThenSurfaceStateIsNotModified) {
typedef typename FamilyType::RENDER_SURFACE_STATE RENDER_SURFACE_STATE;
MockContext context;
auto image = std::unique_ptr<Image>(ImageHelper<Image1dDefaults>::create(&context));
auto surfaceStateBefore = FamilyType::cmdInitRenderSurfaceState;
auto surfaceStateAfter = FamilyType::cmdInitRenderSurfaceState;
auto imageHw = static_cast<ImageHw<FamilyType> *>(image.get());
EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE)));
imageHw->setClearColorParams(&surfaceStateAfter, imageHw->getGraphicsAllocation()->getDefaultGmm());
EXPECT_EQ(0, memcmp(&surfaceStateBefore, &surfaceStateAfter, sizeof(RENDER_SURFACE_STATE)));
}

View File

@ -1,24 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/kernel_commands.h"
#include "test.h"
#include "unit_tests/fixtures/device_fixture.h"
#include "unit_tests/mocks/mock_kernel.h"
using namespace NEO;
using Gen10KernelTest = Test<DeviceFixture>;
GEN10TEST_F(Gen10KernelTest, givenKernelWhenCanTransformImagesIsCalledThenReturnsTrue) {
MockKernelWithInternals mockKernel(*pDevice);
auto retVal = mockKernel.mockKernel->Kernel::canTransformImages();
EXPECT_TRUE(retVal);
}
using Gen10KernelCommandsTest = testing::Test;
GEN10TEST_F(Gen10KernelCommandsTest, givenGen10PlatformWhenDoBindingTablePrefetchIsCalledThenReturnsTrue) {
EXPECT_TRUE(KernelCommandsHelper<FamilyType>::doBindingTablePrefetch());
}

View File

@ -1,15 +0,0 @@
#
# Copyright (C) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
set(IGDRCL_SRCS_tests_gen10_linux
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/device_factory_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests_gen10.cpp
)
if(UNIX)
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen10_linux})
add_subdirectory(dll)
endif()

View File

@ -1,37 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/os_interface/linux/device_factory_tests.h"
typedef DeviceFactoryLinuxTest DeviceFactoryLinuxTestCnl;
GEN10TEST_F(DeviceFactoryLinuxTestCnl, queryWhitelistedPreemptionRegister) {
pDrm->StoredPreemptionSupport =
I915_SCHEDULER_CAP_ENABLED |
I915_SCHEDULER_CAP_PRIORITY |
I915_SCHEDULER_CAP_PREEMPTION;
size_t numDevices = 0;
bool success = DeviceFactory::getDevices(numDevices, executionEnvironment);
EXPECT_TRUE(success);
EXPECT_TRUE(executionEnvironment.getHardwareInfo()->capabilityTable.whitelistedRegisters.csChicken1_0x2580);
DeviceFactory::releaseDevices();
}
GEN10TEST_F(DeviceFactoryLinuxTestCnl, queryNotWhitelistedPreemptionRegister) {
pDrm->StoredPreemptionSupport = 0;
size_t numDevices = 0;
bool success = DeviceFactory::getDevices(numDevices, executionEnvironment);
EXPECT_TRUE(success);
EXPECT_FALSE(executionEnvironment.getHardwareInfo()->capabilityTable.whitelistedRegisters.csChicken1_0x2580);
DeviceFactory::releaseDevices();
}

View File

@ -1,11 +0,0 @@
#
# Copyright (C) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
set(IGDRCL_SRCS_linux_dll_tests_gen10
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/device_id_tests_gen10.cpp
)
target_sources(igdrcl_linux_dll_tests PRIVATE ${IGDRCL_SRCS_linux_dll_tests_gen10})

View File

@ -1,59 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/os_interface/linux/drm_neo.h"
#include "test.h"
#include "hw_cmds.h"
#include <array>
using namespace NEO;
TEST(CnlDeviceIdTest, supportedDeviceId) {
std::array<DeviceDescriptor, 20> expectedDescriptors = {{
{ICNL_5x8_DESK_DEVICE_F0_ID, &CNL_2x5x8::hwInfo, &CNL_2x5x8::setupHardwareInfo, GTTYPE_GT2},
{ICNL_5x8_DESKTOP_DEVICE_F0_ID, &CNL_2x5x8::hwInfo, &CNL_2x5x8::setupHardwareInfo, GTTYPE_GT2},
{ICNL_5x8_HALO_DEVICE_F0_ID, &CNL_2x5x8::hwInfo, &CNL_2x5x8::setupHardwareInfo, GTTYPE_GT2},
{ICNL_5x8_SUPERSKU_DEVICE_F0_ID, &CNL_2x5x8::hwInfo, &CNL_2x5x8::setupHardwareInfo, GTTYPE_GT2},
{ICNL_5x8_ULX_DEVICE_F0_ID, &CNL_2x5x8::hwInfo, &CNL_2x5x8::setupHardwareInfo, GTTYPE_GT2},
{ICNL_5x8_ULT_DEVICE_F0_ID, &CNL_2x5x8::hwInfo, &CNL_2x5x8::setupHardwareInfo, GTTYPE_GT2},
{ICNL_4x8_ULT_DEVICE_F0_ID, &CNL_2x4x8::hwInfo, &CNL_2x4x8::setupHardwareInfo, GTTYPE_GT2},
{ICNL_4x8_ULX_DEVICE_F0_ID, &CNL_2x4x8::hwInfo, &CNL_2x4x8::setupHardwareInfo, GTTYPE_GT2},
{ICNL_4x8_HALO_DEVICE_F0_ID, &CNL_2x4x8::hwInfo, &CNL_2x4x8::setupHardwareInfo, GTTYPE_GT2},
{ICNL_3x8_DESK_DEVICE_F0_ID, &CNL_1x3x8::hwInfo, &CNL_1x3x8::setupHardwareInfo, GTTYPE_GT1},
{ICNL_3x8_ULT_DEVICE_F0_ID, &CNL_1x3x8::hwInfo, &CNL_1x3x8::setupHardwareInfo, GTTYPE_GT1},
{ICNL_2x8_ULT_DEVICE_F0_ID, &CNL_1x2x8::hwInfo, &CNL_1x2x8::setupHardwareInfo, GTTYPE_GT1},
{ICNL_3x8_HALO_DEVICE_F0_ID, &CNL_1x3x8::hwInfo, &CNL_1x3x8::setupHardwareInfo, GTTYPE_GT1},
{ICNL_3x8_DESKTOP_DEVICE_F0_ID, &CNL_1x3x8::hwInfo, &CNL_1x3x8::setupHardwareInfo, GTTYPE_GT1},
{ICNL_3x8_ULX_DEVICE_F0_ID, &CNL_1x3x8::hwInfo, &CNL_1x3x8::setupHardwareInfo, GTTYPE_GT1},
{ICNL_2x8_ULX_DEVICE_F0_ID, &CNL_1x2x8::hwInfo, &CNL_1x2x8::setupHardwareInfo, GTTYPE_GT1},
{ICNL_2x8_HALO_DEVICE_F0_ID, &CNL_1x2x8::hwInfo, &CNL_1x2x8::setupHardwareInfo, GTTYPE_GT1},
{ICNL_9x8_DESK_DEVICE_F0_ID, &CNL_4x9x8::hwInfo, &CNL_4x9x8::setupHardwareInfo, GTTYPE_GT3},
{ICNL_9x8_ULT_DEVICE_F0_ID, &CNL_4x9x8::hwInfo, &CNL_4x9x8::setupHardwareInfo, GTTYPE_GT3},
{ICNL_9x8_SUPERSKU_DEVICE_F0_ID, &CNL_4x9x8::hwInfo, &CNL_4x9x8::setupHardwareInfo, GTTYPE_GT3},
}};
auto compareStructs = [](const DeviceDescriptor *first, const DeviceDescriptor *second) {
return first->deviceId == second->deviceId && first->pHwInfo == second->pHwInfo &&
first->setupHardwareInfo == second->setupHardwareInfo && first->eGtType == second->eGtType;
};
size_t startIndex = 0;
while (!compareStructs(&expectedDescriptors[0], &deviceDescriptorTable[startIndex]) &&
deviceDescriptorTable[startIndex].deviceId != 0) {
startIndex++;
};
EXPECT_NE(0u, deviceDescriptorTable[startIndex].deviceId);
for (auto &expected : expectedDescriptors) {
EXPECT_TRUE(compareStructs(&expected, &deviceDescriptorTable[startIndex]));
startIndex++;
}
}

View File

@ -1,162 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/helpers/gtest_helpers.h"
#include "unit_tests/os_interface/linux/hw_info_config_linux_tests.h"
using namespace NEO;
using namespace std;
struct HwInfoConfigTestLinuxCnl : HwInfoConfigTestLinux {
void SetUp() override {
HwInfoConfigTestLinux::SetUp();
drm->StoredDeviceID = ICNL_5x8_SUPERSKU_DEVICE_F0_ID;
drm->setGtType(GTTYPE_GT2);
drm->StoredSSVal = 3;
}
};
CNLTEST_F(HwInfoConfigTestLinuxCnl, configureHwInfo) {
auto hwInfoConfig = HwInfoConfig::get(productFamily);
int ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(0, ret);
EXPECT_EQ((unsigned short)drm->StoredDeviceID, outHwInfo.platform.usDeviceID);
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.platform.usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.gtSystemInfo.EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.gtSystemInfo.SubSliceCount);
EXPECT_EQ(1u, outHwInfo.gtSystemInfo.SliceCount);
EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);
EXPECT_EQ(GTTYPE_GT2, outHwInfo.platform.eGTType);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT1);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT1_5);
EXPECT_EQ(1u, outHwInfo.featureTable.ftrGT2);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT3);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT4);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGTA);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGTC);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGTX);
drm->StoredDeviceID = ICNL_3x8_ULT_DEVICE_F0_ID;
drm->StoredSSVal = 4;
drm->setGtType(GTTYPE_GT1);
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(0, ret);
EXPECT_EQ((unsigned short)drm->StoredDeviceID, outHwInfo.platform.usDeviceID);
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.platform.usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.gtSystemInfo.EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.gtSystemInfo.SubSliceCount);
EXPECT_EQ(2u, outHwInfo.gtSystemInfo.SliceCount);
EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);
EXPECT_EQ(GTTYPE_GT1, outHwInfo.platform.eGTType);
EXPECT_EQ(1u, outHwInfo.featureTable.ftrGT1);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT1_5);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT2);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT3);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT4);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGTA);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGTC);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGTX);
drm->StoredDeviceID = ICNL_3x8_ULT_DEVICE_F0_ID;
drm->StoredSSVal = 6;
drm->setGtType(GTTYPE_GT2_5);
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(0, ret);
EXPECT_EQ((unsigned short)drm->StoredDeviceID, outHwInfo.platform.usDeviceID);
EXPECT_EQ((unsigned short)drm->StoredDeviceRevID, outHwInfo.platform.usRevId);
EXPECT_EQ((uint32_t)drm->StoredEUVal, outHwInfo.gtSystemInfo.EUCount);
EXPECT_EQ((uint32_t)drm->StoredSSVal, outHwInfo.gtSystemInfo.SubSliceCount);
EXPECT_EQ(3u, outHwInfo.gtSystemInfo.SliceCount);
EXPECT_EQ(aub_stream::ENGINE_RCS, outHwInfo.capabilityTable.defaultEngineType);
EXPECT_EQ(GTTYPE_GT2_5, outHwInfo.platform.eGTType);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT1);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT1_5);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT2);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT3);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGT4);
EXPECT_EQ(0u, outHwInfo.featureTable.ftrGTA);
}
CNLTEST_F(HwInfoConfigTestLinuxCnl, negative) {
auto hwInfoConfig = HwInfoConfig::get(productFamily);
drm->StoredRetValForDeviceID = -1;
int ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(-1, ret);
drm->StoredRetValForDeviceID = 0;
drm->StoredRetValForDeviceRevID = -1;
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(-1, ret);
drm->StoredRetValForDeviceRevID = 0;
drm->StoredRetValForEUVal = -1;
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(-1, ret);
drm->StoredRetValForEUVal = 0;
drm->StoredRetValForSSVal = -1;
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(-1, ret);
}
CNLTEST_F(HwInfoConfigTestLinuxCnl, configureHwInfoWaFlags) {
auto hwInfoConfig = HwInfoConfig::get(productFamily);
drm->StoredDeviceRevID = 0;
int ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(0, ret);
drm->StoredDeviceRevID = 1;
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(0, ret);
EXPECT_EQ(0u, outHwInfo.workaroundTable.waEncryptedEdramOnlyPartials);
drm->StoredDeviceRevID = 2;
ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(0, ret);
EXPECT_EQ(0u, outHwInfo.workaroundTable.waFbcLinearSurfaceStride);
EXPECT_EQ(0u, outHwInfo.workaroundTable.waEncryptedEdramOnlyPartials);
}
CNLTEST_F(HwInfoConfigTestLinuxCnl, configureHwInfoIsL3HashModeEnabled) {
auto hwInfoConfig = HwInfoConfig::get(productFamily);
uint64_t oldL3CacheSizeInKb = testSysInfo->L3CacheSizeInKb;
uint32_t oldL3BankCount = testSysInfo->L3BankCount;
testSysInfo->IsL3HashModeEnabled = true;
drm->StoredSSVal = 9;
int ret = hwInfoConfig->configureHwInfo(&pInHwInfo, &outHwInfo, osInterface);
EXPECT_EQ(0, ret);
EXPECT_EQ((oldL3BankCount - 1), outHwInfo.gtSystemInfo.L3BankCount);
EXPECT_EQ_VAL((oldL3CacheSizeInKb - 256), outHwInfo.gtSystemInfo.L3CacheSizeInKb);
}
template <typename T>
class CnlHwInfoTests : public ::testing::Test {
};
typedef ::testing::Types<CNL_2x5x8, CNL_2x4x8, CNL_1x3x8, CNL_1x2x8, CNL_4x9x8> cnlTestTypes;
TYPED_TEST_CASE(CnlHwInfoTests, cnlTestTypes);
TYPED_TEST(CnlHwInfoTests, gtSetupIsCorrect) {
HardwareInfo hwInfo;
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
TypeParam::setupHardwareInfo(&hwInfo, false);
EXPECT_GT(gtSystemInfo.EUCount, 0u);
EXPECT_GT(gtSystemInfo.ThreadCount, 0u);
EXPECT_GT(gtSystemInfo.SliceCount, 0u);
EXPECT_GT(gtSystemInfo.SubSliceCount, 0u);
EXPECT_GT_VAL(gtSystemInfo.L3CacheSizeInKb, 0u);
EXPECT_EQ(gtSystemInfo.CsrSizeInMb, 8u);
EXPECT_FALSE(gtSystemInfo.IsDynamicallyPopulated);
}

View File

@ -1,50 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "unit_tests/helpers/debug_manager_state_restore.h"
#include "unit_tests/source_level_debugger/source_level_debugger_preamble_test.h"
#include "gtest/gtest.h"
using namespace NEO;
typedef CNLFamily GfxFamily;
#include "unit_tests/source_level_debugger/source_level_debugger_preamble_test.inl"
using PreambleTestGen10 = ::testing::Test;
GEN10TEST_F(PreambleTestGen10, givenMidThreadPreemptionAndDebuggingActiveWhenStateSipIsProgrammedThenCorrectSipKernelIsUsed) {
SourceLevelDebuggerPreambleTest<FamilyType>::givenMidThreadPreemptionAndDebuggingActiveWhenStateSipIsProgrammedThenCorrectSipKernelIsUsedTest();
}
GEN10TEST_F(PreambleTestGen10, givenMidThreadPreemptionAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) {
SourceLevelDebuggerPreambleTest<FamilyType>::givenMidThreadPreemptionAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest();
}
GEN10TEST_F(PreambleTestGen10, givenPreemptionDisabledAndDebuggingActiveWhenPreambleIsProgrammedThenCorrectSipKernelIsUsed) {
SourceLevelDebuggerPreambleTest<FamilyType>::givenPreemptionDisabledAndDebuggingActiveWhenPreambleIsProgrammedThenCorrectSipKernelIsUsedTest();
}
GEN10TEST_F(PreambleTestGen10, givenPreemptionDisabledAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) {
SourceLevelDebuggerPreambleTest<FamilyType>::givenPreemptionDisabledAndDebuggingActiveWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest();
}
GEN10TEST_F(PreambleTestGen10, givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleIsProgrammedThenCorrectSipKernelIsUsed) {
SourceLevelDebuggerPreambleTest<FamilyType>::givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleIsProgrammedThenCorrectSipKernelIsUsedTest();
}
GEN10TEST_F(PreambleTestGen10, givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) {
SourceLevelDebuggerPreambleTest<FamilyType>::givenMidThreadPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest();
}
GEN10TEST_F(PreambleTestGen10, givenDisabledPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturned) {
SourceLevelDebuggerPreambleTest<FamilyType>::givenDisabledPreemptionAndDisabledDebuggingWhenPreambleSizeIsQueriedThenCorrecrSizeIsReturnedTest();
}
GEN10TEST_F(PreambleTestGen10, givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThen2MiLoadRegisterImmCmdsAndStateSipAreInlcuded) {
SourceLevelDebuggerPreambleTest<FamilyType>::givenKernelDebuggingActiveAndDisabledPreemptionWhenGetAdditionalCommandsSizeIsCalledThen2MiLoadRegisterImmCmdsAreInlcudedTest();
}

View File

@ -1,28 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/sampler/sampler.h"
#include "test.h"
#include "unit_tests/fixtures/device_fixture.h"
#include "unit_tests/mocks/mock_context.h"
#include <memory>
using namespace NEO;
typedef Test<DeviceFixture> Gen10SamplerTest;
GEN10TEST_F(Gen10SamplerTest, appendSamplerStateParamsDoesNothing) {
typedef typename FamilyType::SAMPLER_STATE SAMPLER_STATE;
std::unique_ptr<MockContext> context(new MockContext());
std::unique_ptr<SamplerHw<FamilyType>> sampler(new SamplerHw<FamilyType>(context.get(), CL_FALSE, CL_ADDRESS_NONE, CL_FILTER_NEAREST));
auto stateWithoutAppendedParams = FamilyType::cmdInitSamplerState;
auto stateWithAppendedParams = FamilyType::cmdInitSamplerState;
EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0);
sampler->appendSamplerStateParams(&stateWithAppendedParams);
EXPECT_TRUE(memcmp(&stateWithoutAppendedParams, &stateWithAppendedParams, sizeof(SAMPLER_STATE)) == 0);
}

View File

@ -1,32 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/device_queue/device_queue_hw.h"
#include "hw_cmds.h"
// Keep the order of device_enqueue.h and scheduler_definitions.h as the latter uses defines from the first one
#include "runtime/gen10/device_enqueue.h"
#include "runtime/gen10/scheduler_definitions.h"
#include "unit_tests/scheduler/scheduler_source_tests.h"
// Keep this include below scheduler_definitions.h and device_enqueue.h headers as it depends on defines defined in them
#include "unit_tests/scheduler/scheduler_source_tests.inl"
using namespace NEO;
typedef SchedulerSourceTest SchedulerSourceTestGen10;
GEN10TEST_F(SchedulerSourceTestGen10, GivenDeviceQueueWhenCommandsSizeIsCalculatedThenItEqualsSpaceForEachEnqueueInSchedulerKernelCode) {
givenDeviceQueueWhenCommandsSizeIsCalculatedThenItEqualsSpaceForEachEnqueueInSchedulerKernelCodeTest<FamilyType>();
}
GEN10TEST_F(SchedulerSourceTestGen10, GivenDeviceQueueWhenSlbDummyCommandsAreBuildThenSizeUsedIsCorrect) {
givenDeviceQueueWhenSlbDummyCommandsAreBuildThenSizeUsedIsCorrectTest<FamilyType>();
}
GEN10TEST_F(SchedulerSourceTestGen10, GivenDeviceQueueThenNumberOfEnqueuesEqualsNumberOfEnqueuesInSchedulerKernelCode) {
givenDeviceQueueThenNumberOfEnqueuesEqualsNumberOfEnqueuesInSchedulerKernelCodeTest<FamilyType>();
}

View File

@ -1,108 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/hw_helper.h"
#include "test.h"
#include "unit_tests/fixtures/device_fixture.h"
using namespace NEO;
typedef Test<DeviceFixture> Gen10DeviceCaps;
GEN10TEST_F(Gen10DeviceCaps, reportsOcl21) {
const auto &caps = pDevice->getDeviceInfo();
EXPECT_STREQ("OpenCL 2.1 NEO ", caps.clVersion);
EXPECT_STREQ("OpenCL C 2.0 ", caps.clCVersion);
}
GEN10TEST_F(Gen10DeviceCaps, allSkusSupportFP64) {
const auto &caps = pDevice->getDeviceInfo();
std::string extensionString = caps.deviceExtensions;
EXPECT_NE(std::string::npos, extensionString.find(std::string("cl_khr_fp64")));
EXPECT_NE(0u, caps.doubleFpConfig);
}
GEN10TEST_F(Gen10DeviceCaps, allSkusSupportCorrectlyRoundedDivideSqrt) {
const auto &caps = pDevice->getDeviceInfo();
EXPECT_NE(0u, caps.singleFpConfig & CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT);
}
GEN10TEST_F(Gen10DeviceCaps, defaultPreemptionMode) {
EXPECT_EQ(PreemptionMode::MidThread, pDevice->getHardwareInfo().capabilityTable.defaultPreemptionMode);
}
GEN10TEST_F(Gen10DeviceCaps, whitelistedRegisters) {
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.whitelistedRegisters.csChicken1_0x2580);
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.whitelistedRegisters.chicken0hdc_0xE5F0);
}
GEN10TEST_F(Gen10DeviceCaps, profilingTimerResolution) {
const auto &caps = pDevice->getDeviceInfo();
EXPECT_EQ(83u, caps.outProfilingTimerResolution);
}
GEN10TEST_F(Gen10DeviceCaps, compression) {
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedBuffers);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.ftrRenderCompressedImages);
}
GEN10TEST_F(Gen10DeviceCaps, givenHwInfoWhenRequestedComputeUnitsUsedForScratchThenReturnValidValue) {
const auto &hwInfo = pDevice->getHardwareInfo();
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
uint32_t expectedValue = hwInfo.gtSystemInfo.MaxSubSlicesSupported * hwInfo.gtSystemInfo.MaxEuPerSubSlice *
hwInfo.gtSystemInfo.ThreadCount / hwInfo.gtSystemInfo.EUCount;
EXPECT_EQ(expectedValue, hwHelper.getComputeUnitsUsedForScratch(&hwInfo));
EXPECT_EQ(expectedValue, pDevice->getDeviceInfo().computeUnitsUsedForScratch);
}
GEN10TEST_F(Gen10DeviceCaps, givenHwInfoWhenSlmSizeIsRequiredThenReturnCorrectValue) {
EXPECT_EQ(64u, pDevice->getHardwareInfo().capabilityTable.slmSize);
}
GEN10TEST_F(Gen10DeviceCaps, givenGen10WhenCheckBlitterOperationsSupportThenReturnFalse) {
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.blitterOperationsSupported);
}
typedef Test<DeviceFixture> CnlUsDeviceIdTest;
CNLTEST_F(CnlUsDeviceIdTest, isSimulationCap) {
unsigned short cnlSimulationIds[6] = {
ICNL_3x8_DESK_DEVICE_F0_ID,
ICNL_5x8_DESK_DEVICE_F0_ID,
ICNL_9x8_DESK_DEVICE_F0_ID,
ICNL_13x8_DESK_DEVICE_F0_ID,
0, // default, non-simulation
};
NEO::MockDevice *mockDevice = nullptr;
for (auto id : cnlSimulationIds) {
mockDevice = createWithUsDeviceId(id);
ASSERT_NE(mockDevice, nullptr);
if (id == 0)
EXPECT_FALSE(mockDevice->isSimulation());
else
EXPECT_TRUE(mockDevice->isSimulation());
delete mockDevice;
}
}
CNLTEST_F(CnlUsDeviceIdTest, kmdNotifyMechanism) {
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableKmdNotify);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayKmdNotifyMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleep);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepMicroseconds);
EXPECT_FALSE(pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.enableQuickKmdSleepForSporadicWaits);
EXPECT_EQ(0, pDevice->getHardwareInfo().capabilityTable.kmdNotifyProperties.delayQuickKmdSleepForSporadicWaitsMicroseconds);
}
CNLTEST_F(CnlUsDeviceIdTest, GivenCNLWhenCheckftr64KBpagesThenTrue) {
EXPECT_TRUE(pDevice->getHardwareInfo().capabilityTable.ftr64KBpages);
}

View File

@ -1,54 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/context/context.h"
#include "unit_tests/fixtures/device_host_queue_fixture.h"
#include "unit_tests/helpers/hw_parse.h"
#include "unit_tests/mocks/mock_device_queue.h"
using namespace NEO;
using namespace DeviceHostQueue;
typedef DeviceQueueHwTest Gen10DeviceQueueSlb;
GEN10TEST_F(Gen10DeviceQueueSlb, expectedAllocationSize) {
deviceQueue = createQueueObject();
ASSERT_NE(deviceQueue, nullptr);
auto expectedSize = getMinimumSlbSize<FamilyType>();
expectedSize *= 128; //num of enqueues
expectedSize += sizeof(typename FamilyType::MI_BATCH_BUFFER_START);
expectedSize = alignUp(expectedSize, MemoryConstants::pageSize);
expectedSize += MockDeviceQueueHw<FamilyType>::getExecutionModelCleanupSectionSize();
expectedSize += (4 * MemoryConstants::pageSize);
expectedSize = alignUp(expectedSize, MemoryConstants::pageSize);
ASSERT_NE(deviceQueue->getSlbBuffer(), nullptr);
EXPECT_EQ(deviceQueue->getSlbBuffer()->getUnderlyingBufferSize(), expectedSize);
delete deviceQueue;
}
GEN10TEST_F(Gen10DeviceQueueSlb, SlbCommandsWa) {
auto mockDeviceQueueHw = new MockDeviceQueueHw<FamilyType>(pContext, device,
DeviceHostQueue::deviceQueueProperties::minimumProperties[0]);
EXPECT_FALSE(mockDeviceQueueHw->arbCheckWa);
EXPECT_FALSE(mockDeviceQueueHw->pipeControlWa);
EXPECT_FALSE(mockDeviceQueueHw->miAtomicWa);
EXPECT_FALSE(mockDeviceQueueHw->lriWa);
delete mockDeviceQueueHw;
}
GEN10TEST_F(DeviceQueueHwTest, CSPrefetchSizeWA) {
EXPECT_EQ(612u, DeviceQueueHw<FamilyType>::getCSPrefetchSize());
auto mockDeviceQueueHw = new MockDeviceQueueHw<FamilyType>(pContext, device,
DeviceHostQueue::deviceQueueProperties::minimumProperties[0]);
EXPECT_EQ(752u, mockDeviceQueueHw->getMinimumSlbSize() + mockDeviceQueueHw->getWaCommandsSize());
delete mockDeviceQueueHw;
}

View File

@ -1,135 +0,0 @@
/*
* Copyright (C) 2018-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "test.h"
using namespace NEO;
TEST(CnlHwInfoConfig, givenHwInfoConfigStringThenAfterSetupResultingHwInfoIsCorrect) {
if (IGFX_CANNONLAKE != productFamily) {
return;
}
HardwareInfo hwInfo;
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
gtSystemInfo = {0};
std::string strConfig = "1x2x8";
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
EXPECT_EQ(2u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(15u, gtSystemInfo.EUCount);
strConfig = "1x3x8";
gtSystemInfo = {0};
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
EXPECT_EQ(1u, gtSystemInfo.SliceCount);
EXPECT_EQ(3u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(23u, gtSystemInfo.EUCount);
strConfig = "2x4x8";
gtSystemInfo = {0};
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
EXPECT_EQ(2u, gtSystemInfo.SliceCount);
EXPECT_EQ(8u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(31u, gtSystemInfo.EUCount);
strConfig = "2x5x8";
gtSystemInfo = {0};
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
EXPECT_EQ(2u, gtSystemInfo.SliceCount);
EXPECT_EQ(10u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(39u, gtSystemInfo.EUCount);
strConfig = "4x9x8";
gtSystemInfo = {0};
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
EXPECT_EQ(4u, gtSystemInfo.SliceCount);
EXPECT_EQ(36u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(71u, gtSystemInfo.EUCount);
strConfig = "default";
gtSystemInfo = {0};
hardwareInfoSetup[productFamily](&hwInfo, false, strConfig);
EXPECT_EQ(2u, gtSystemInfo.SliceCount);
EXPECT_EQ(10u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(39u, gtSystemInfo.EUCount);
strConfig = "erroneous";
gtSystemInfo = {0};
EXPECT_ANY_THROW(hardwareInfoSetup[productFamily](&hwInfo, false, strConfig));
EXPECT_EQ(0u, gtSystemInfo.SliceCount);
EXPECT_EQ(0u, gtSystemInfo.SubSliceCount);
EXPECT_EQ(0u, gtSystemInfo.EUCount);
}
using CnlHwInfo = ::testing::Test;
CNLTEST_F(CnlHwInfo, givenBoolWhenCallCnlHardwareInfoSetupThenFeatureTableAndWorkaroundTableAreSetCorrect) {
std::string strConfig[] = {
"1x2x8",
"1x3x8",
"2x5x8",
"2x4x8",
"4x9x8"};
bool boolValue[]{
true, false};
HardwareInfo hwInfo;
GT_SYSTEM_INFO &gtSystemInfo = hwInfo.gtSystemInfo;
FeatureTable &featureTable = hwInfo.featureTable;
WorkaroundTable &workaroundTable = hwInfo.workaroundTable;
PLATFORM &platform = hwInfo.platform;
for (auto &config : strConfig) {
for (auto setParamBool : boolValue) {
gtSystemInfo = {0};
featureTable = {};
workaroundTable = {};
platform.usRevId = 9;
hardwareInfoSetup[productFamily](&hwInfo, setParamBool, config);
EXPECT_EQ(setParamBool, featureTable.ftrL3IACoherency);
EXPECT_EQ(setParamBool, featureTable.ftrGpGpuMidBatchPreempt);
EXPECT_EQ(setParamBool, featureTable.ftrGpGpuThreadGroupLevelPreempt);
EXPECT_EQ(setParamBool, featureTable.ftrGpGpuMidThreadLevelPreempt);
EXPECT_EQ(setParamBool, featureTable.ftr3dMidBatchPreempt);
EXPECT_EQ(setParamBool, featureTable.ftr3dObjectLevelPreempt);
EXPECT_EQ(setParamBool, featureTable.ftrPerCtxtPreemptionGranularityControl);
EXPECT_EQ(setParamBool, featureTable.ftrPPGTT);
EXPECT_EQ(setParamBool, featureTable.ftrSVM);
EXPECT_EQ(setParamBool, featureTable.ftrIA32eGfxPTEs);
EXPECT_EQ(setParamBool, featureTable.ftrStandardMipTailFormat);
EXPECT_EQ(setParamBool, featureTable.ftrDisplayYTiling);
EXPECT_EQ(setParamBool, featureTable.ftrTranslationTable);
EXPECT_EQ(setParamBool, featureTable.ftrUserModeTranslationTable);
EXPECT_EQ(setParamBool, featureTable.ftrTileMappedResource);
EXPECT_EQ(setParamBool, featureTable.ftrEnableGuC);
EXPECT_EQ(setParamBool, featureTable.ftrFbc);
EXPECT_EQ(setParamBool, featureTable.ftrFbc2AddressTranslation);
EXPECT_EQ(setParamBool, featureTable.ftrFbcBlitterTracking);
EXPECT_EQ(setParamBool, featureTable.ftrFbcCpuTracking);
EXPECT_EQ(setParamBool, featureTable.ftrAstcHdr2D);
EXPECT_EQ(setParamBool, featureTable.ftrAstcLdr2D);
EXPECT_EQ(setParamBool, featureTable.ftrTileY);
EXPECT_EQ(setParamBool, workaroundTable.wa4kAlignUVOffsetNV12LinearSurface);
EXPECT_EQ(setParamBool, workaroundTable.waSendMIFLUSHBeforeVFE);
EXPECT_EQ(setParamBool, workaroundTable.waReportPerfCountUseGlobalContextID);
EXPECT_EQ(setParamBool, workaroundTable.waSamplerCacheFlushBetweenRedescribedSurfaceReads);
EXPECT_EQ(false, workaroundTable.waFbcLinearSurfaceStride);
EXPECT_EQ(false, workaroundTable.waEncryptedEdramOnlyPartials);
platform.usRevId = 0;
workaroundTable = {};
hardwareInfoSetup[productFamily](&hwInfo, true, config);
EXPECT_EQ(true, workaroundTable.waFbcLinearSurfaceStride);
EXPECT_EQ(true, workaroundTable.waEncryptedEdramOnlyPartials);
}
}
}

View File

@ -1,28 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/options.h"
#include "test.h"
#include "unit_tests/fixtures/platform_fixture.h"
using namespace NEO;
struct Gen10PlatformCaps : public PlatformFixture, public ::testing::Test {
void SetUp() override {
PlatformFixture::SetUp();
}
void TearDown() override {
PlatformFixture::TearDown();
}
};
GEN10TEST_F(Gen10PlatformCaps, hpSkusSupportFP64) {
const auto &caps = pPlatform->getPlatformInfo();
EXPECT_NE(std::string::npos, caps.extensions.find(std::string("cl_khr_fp64")));
}

View File

@ -1,167 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/command_stream/preemption.h"
#include "runtime/gen10/reg_configs.h"
#include "unit_tests/helpers/debug_manager_state_restore.h"
#include "unit_tests/preamble/preamble_fixture.h"
#include "reg_configs_common.h"
namespace NEO {
struct HardwareInfo;
extern const HardwareInfo **platformDevices;
} // namespace NEO
using namespace NEO;
typedef PreambleFixture CnlSlm;
CNLTEST_F(CnlSlm, shouldBeEnabledOnGen10) {
typedef CNLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
LinearStream &cs = linearStream;
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(**platformDevices, true);
PreambleHelper<CNLFamily>::programL3(&cs, l3Config);
parseCommands<CNLFamily>(cs);
auto itorLRI = find<MI_LOAD_REGISTER_IMM *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), itorLRI);
const auto &lri = *reinterpret_cast<MI_LOAD_REGISTER_IMM *>(*itorLRI);
auto RegisterOffset = L3CNTLRegisterOffset<FamilyType>::registerOffset;
EXPECT_EQ(RegisterOffset, lri.getRegisterOffset());
EXPECT_EQ(1u, lri.getDataDword() & 1);
}
using CnlPreambleWaCmds = PreambleFixture;
typedef PreambleFixture Gen10UrbEntryAllocationSize;
CNLTEST_F(Gen10UrbEntryAllocationSize, getUrbEntryAllocationSize) {
uint32_t actualVal = PreambleHelper<FamilyType>::getUrbEntryAllocationSize();
EXPECT_EQ(1024u, actualVal);
}
typedef PreambleVfeState Gen10PreambleVfeState;
CNLTEST_F(Gen10PreambleVfeState, WaOff) {
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
testWaTable->waSendMIFLUSHBeforeVFE = 0;
LinearStream &cs = linearStream;
PreambleHelper<FamilyType>::programVFEState(&linearStream, pPlatform->getDevice(0)->getHardwareInfo(), 0, 0);
parseCommands<FamilyType>(cs);
auto itorPC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), itorPC);
const auto &pc = *reinterpret_cast<PIPE_CONTROL *>(*itorPC);
EXPECT_FALSE(pc.getRenderTargetCacheFlushEnable());
EXPECT_FALSE(pc.getDepthCacheFlushEnable());
EXPECT_FALSE(pc.getDcFlushEnable());
EXPECT_EQ(1u, pc.getCommandStreamerStallEnable());
}
CNLTEST_F(Gen10PreambleVfeState, WaOn) {
typedef typename FamilyType::PIPE_CONTROL PIPE_CONTROL;
testWaTable->waSendMIFLUSHBeforeVFE = 1;
LinearStream &cs = linearStream;
PreambleHelper<FamilyType>::programVFEState(&linearStream, pPlatform->getDevice(0)->getHardwareInfo(), 0, 0);
parseCommands<FamilyType>(cs);
auto itorPC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
ASSERT_NE(cmdList.end(), itorPC);
const auto &pc = *reinterpret_cast<PIPE_CONTROL *>(*itorPC);
EXPECT_TRUE(pc.getRenderTargetCacheFlushEnable());
EXPECT_TRUE(pc.getDepthCacheFlushEnable());
EXPECT_TRUE(pc.getDcFlushEnable());
EXPECT_EQ(1u, pc.getCommandStreamerStallEnable());
}
TEST(L3CNTLREGConfig, checkValidValues) {
uint32_t validCNLNoSLMConfigs[] = {0x80000180, 0x00418180, 0x00420160, 0x00030140, 0xc0000340, 0x00428140};
uint32_t validCNLSLMConfigs[] = {0, 0xa0000321, 0x01008121, 0xc0000101};
bool noSLMConfigValid = false;
bool SLMConfigValid = false;
for (uint32_t i = 0; i < sizeof(validCNLNoSLMConfigs) / sizeof(validCNLNoSLMConfigs[0]); i++) {
if (L3CNTLREGConfig<IGFX_CANNONLAKE>::valueForNoSLM == validCNLNoSLMConfigs[i]) {
noSLMConfigValid = true;
break;
}
}
for (uint32_t i = 1; i < sizeof(validCNLSLMConfigs) / sizeof(validCNLSLMConfigs[0]); i++) {
if (L3CNTLREGConfig<IGFX_CANNONLAKE>::valueForSLM == validCNLSLMConfigs[i]) {
SLMConfigValid = true;
break;
}
}
EXPECT_TRUE(SLMConfigValid);
EXPECT_TRUE(noSLMConfigValid);
}
typedef PreambleFixture L3ErrorDetectionBit;
GEN10TEST_F(L3ErrorDetectionBit, GivenGen10WhenProgrammingL3ThenErrorDetectionBehaviorControlBitSet) {
uint32_t l3Config = 0;
l3Config = getL3ConfigHelper<IGFX_CANNONLAKE>(true);
uint32_t errorDetectionBehaviorControlBit = 1 << 9;
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
l3Config = getL3ConfigHelper<IGFX_CANNONLAKE>(false);
EXPECT_TRUE((l3Config & errorDetectionBehaviorControlBit) != 0);
}
typedef PreambleFixture PreemptionWatermarkGen10;
GEN10TEST_F(PreemptionWatermarkGen10, givenPreambleThenPreambleWorkAroundsIsNotProgrammed) {
typedef CNLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
typedef CNLFamily::PIPE_CONTROL PIPE_CONTROL;
PreambleHelper<FamilyType>::programGenSpecificPreambleWorkArounds(&linearStream, **platformDevices);
parseCommands<FamilyType>(linearStream);
auto cmd = findMmioCmd<FamilyType>(cmdList.begin(), cmdList.end(), FfSliceCsChknReg2::address);
EXPECT_EQ(nullptr, cmd);
}
typedef PreambleFixture ThreadArbitrationGen10;
GEN10TEST_F(ThreadArbitrationGen10, givenPreambleWhenItIsProgrammedThenThreadArbitrationIsSet) {
DebugManagerStateRestore dbgRestore;
DebugManager.flags.ForcePreemptionMode.set(static_cast<int32_t>(PreemptionMode::Disabled));
typedef CNLFamily::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
typedef CNLFamily::PIPE_CONTROL PIPE_CONTROL;
LinearStream &cs = linearStream;
uint32_t l3Config = PreambleHelper<FamilyType>::getL3Config(**platformDevices, true);
MockDevice mockDevice;
PreambleHelper<FamilyType>::programPreamble(&linearStream, mockDevice, l3Config,
ThreadArbitrationPolicy::RoundRobin,
nullptr);
parseCommands<FamilyType>(cs);
auto ppC = find<PIPE_CONTROL *>(cmdList.begin(), cmdList.end());
ASSERT_NE(ppC, cmdList.end());
auto cmd = findMmioCmd<FamilyType>(cmdList.begin(), cmdList.end(), RowChickenReg4::address);
ASSERT_NE(nullptr, cmd);
EXPECT_EQ(RowChickenReg4::regDataForArbitrationPolicy[ThreadArbitrationPolicy::RoundRobin], cmd->getDataDword());
MockDevice device;
EXPECT_EQ(0u, PreambleHelper<CNLFamily>::getAdditionalCommandsSize(device));
EXPECT_EQ(sizeof(MI_LOAD_REGISTER_IMM) + sizeof(PIPE_CONTROL), PreambleHelper<CNLFamily>::getThreadArbitrationCommandsSize());
}
GEN10TEST_F(ThreadArbitrationGen10, defaultArbitrationPolicy) {
EXPECT_EQ(ThreadArbitrationPolicy::RoundRobinAfterDependency, PreambleHelper<CNLFamily>::getDefaultThreadArbitrationPolicy());
}

View File

@ -1,309 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/built_ins/built_ins.h"
#include "runtime/command_stream/preemption.h"
#include "runtime/helpers/hw_helper.h"
#include "unit_tests/command_queue/enqueue_fixture.h"
#include "unit_tests/fixtures/preemption_fixture.h"
#include "unit_tests/helpers/hw_parse.h"
#include "unit_tests/mocks/mock_buffer.h"
#include "unit_tests/mocks/mock_command_queue.h"
#include "unit_tests/mocks/mock_csr.h"
#include "unit_tests/mocks/mock_submissions_aggregator.h"
namespace NEO {
template <>
void HardwareParse::findCsrBaseAddress<CNLFamily>() {
typedef typename GEN10::GPGPU_CSR_BASE_ADDRESS GPGPU_CSR_BASE_ADDRESS;
itorGpgpuCsrBaseAddress = find<GPGPU_CSR_BASE_ADDRESS *>(cmdList.begin(), itorWalker);
if (itorGpgpuCsrBaseAddress != itorWalker) {
cmdGpgpuCsrBaseAddress = *itorGpgpuCsrBaseAddress;
}
}
} // namespace NEO
using namespace NEO;
using Gen10PreemptionTests = DevicePreemptionTests;
using Gen10PreemptionEnqueueKernelTest = PreemptionEnqueueKernelTest;
using Gen10MidThreadPreemptionEnqueueKernelTest = MidThreadPreemptionEnqueueKernelTest;
using Gen10ThreadGroupPreemptionEnqueueKernelTest = ThreadGroupPreemptionEnqueueKernelTest;
template <>
PreemptionTestHwDetails GetPreemptionTestHwDetails<CNLFamily>() {
PreemptionTestHwDetails ret;
ret.modeToRegValueMap[PreemptionMode::ThreadGroup] = DwordBuilder::build(1, true) | DwordBuilder::build(2, true, false);
ret.modeToRegValueMap[PreemptionMode::MidBatch] = DwordBuilder::build(2, true) | DwordBuilder::build(1, true, false);
ret.modeToRegValueMap[PreemptionMode::MidThread] = DwordBuilder::build(2, true, false) | DwordBuilder::build(1, true, false);
ret.defaultRegValue = ret.modeToRegValueMap[PreemptionMode::MidBatch];
ret.regAddress = 0x2580u;
return ret;
}
GEN10TEST_F(Gen10PreemptionTests, whenMidThreadPreemptionIsNotAvailableThenDoesNotProgramStateSip) {
device->setPreemptionMode(PreemptionMode::ThreadGroup);
size_t requiredSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
EXPECT_EQ(0U, requiredSize);
LinearStream cmdStream{nullptr, 0};
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device);
EXPECT_EQ(0U, cmdStream.getUsed());
}
GEN10TEST_F(Gen10PreemptionTests, whenMidThreadPreemptionIsAvailableThenStateSipIsProgrammed) {
using STATE_SIP = typename FamilyType::STATE_SIP;
device->setPreemptionMode(PreemptionMode::MidThread);
executionEnvironment->DisableMidThreadPreemption = 0;
size_t requiredCmdStreamSize = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*device);
size_t expectedPreambleSize = sizeof(STATE_SIP);
EXPECT_EQ(expectedPreambleSize, requiredCmdStreamSize);
StackVec<char, 8192> streamStorage(requiredCmdStreamSize);
ASSERT_LE(requiredCmdStreamSize, streamStorage.size());
LinearStream cmdStream{streamStorage.begin(), streamStorage.size()};
PreemptionHelper::programStateSip<FamilyType>(cmdStream, *device);
HardwareParse hwParsePreamble;
hwParsePreamble.parseCommands<FamilyType>(cmdStream);
auto stateSipCmd = hwParsePreamble.getCommand<STATE_SIP>();
ASSERT_NE(nullptr, stateSipCmd);
EXPECT_EQ(device->getExecutionEnvironment()->getBuiltIns()->getSipKernel(SipKernelType::Csr, *device).getSipAllocation()->getGpuAddressToPatch(), stateSipCmd->getSystemInstructionPointer());
}
GEN10TEST_F(Gen10ThreadGroupPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreemptionRequestThenDontReprogram) {
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
WhitelistedRegisters regs = {};
regs.csChicken1_0x2580 = true;
pDevice->setForceWhitelistedRegs(true, &regs);
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
csr.getMemoryManager()->setForce32BitAllocations(false);
csr.setMediaVFEStateDirty(false);
auto csrSurface = csr.getPreemptionCsrAllocation();
EXPECT_EQ(nullptr, csrSurface);
HardwareParse hwParser;
size_t off[3] = {0, 0, 0};
size_t gws[3] = {1, 1, 1};
MockKernelWithInternals mockKernel(*pDevice);
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr);
hwParser.parseCommands<FamilyType>(csr.commandStream);
hwParser.findHardwareCommands<FamilyType>();
auto offset = csr.commandStream.getUsed();
bool foundOne = false;
for (auto it : hwParser.lriList) {
auto cmd = genCmdCast<typename FamilyType::MI_LOAD_REGISTER_IMM *>(it);
if (cmd->getRegisterOffset() == 0x2580u) {
EXPECT_FALSE(foundOne);
foundOne = true;
}
}
EXPECT_TRUE(foundOne);
hwParser.cmdList.clear();
hwParser.lriList.clear();
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr);
hwParser.parseCommands<FamilyType>(csr.commandStream, offset);
hwParser.findHardwareCommands<FamilyType>();
for (auto it : hwParser.lriList) {
auto cmd = genCmdCast<typename FamilyType::MI_LOAD_REGISTER_IMM *>(it);
EXPECT_FALSE(cmd->getRegisterOffset() == 0x2580u);
}
}
GEN10TEST_F(Gen10PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledThenPassDevicePreemptionMode) {
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
WhitelistedRegisters regs = {};
regs.csChicken1_0x2580 = true;
pDevice->setForceWhitelistedRegs(true, &regs);
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
pDevice->resetCommandStreamReceiver(mockCsr);
MockKernelWithInternals mockKernel(*pDevice);
EXPECT_EQ(PreemptionMode::ThreadGroup, PreemptionHelper::taskPreemptionMode(*pDevice, mockKernel.mockKernel));
size_t gws[3] = {1, 0, 0};
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
pCmdQ->flush();
EXPECT_EQ(1, mockCsr->flushCalledCount);
EXPECT_EQ(PreemptionMode::ThreadGroup, mockCsr->passedDispatchFlags.preemptionMode);
}
GEN10TEST_F(Gen10PreemptionEnqueueKernelTest, givenValidKernelForPreemptionWhenEnqueueKernelCalledAndBlockedThenPassDevicePreemptionMode) {
pDevice->setPreemptionMode(PreemptionMode::ThreadGroup);
WhitelistedRegisters regs = {};
regs.csChicken1_0x2580 = true;
pDevice->setForceWhitelistedRegs(true, &regs);
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
pDevice->resetCommandStreamReceiver(mockCsr);
MockKernelWithInternals mockKernel(*pDevice);
EXPECT_EQ(PreemptionMode::ThreadGroup, PreemptionHelper::taskPreemptionMode(*pDevice, mockKernel.mockKernel));
UserEvent userEventObj;
cl_event userEvent = &userEventObj;
size_t gws[3] = {1, 0, 0};
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 1, &userEvent, nullptr);
pCmdQ->flush();
EXPECT_EQ(0, mockCsr->flushCalledCount);
userEventObj.setStatus(CL_COMPLETE);
pCmdQ->flush();
EXPECT_EQ(1, mockCsr->flushCalledCount);
EXPECT_EQ(PreemptionMode::ThreadGroup, mockCsr->passedDispatchFlags.preemptionMode);
}
GEN10TEST_F(Gen10MidThreadPreemptionEnqueueKernelTest, givenSecondEnqueueWithTheSamePreemptionRequestThenDontReprogramMidThread) {
typedef typename FamilyType::MI_LOAD_REGISTER_IMM MI_LOAD_REGISTER_IMM;
typedef typename FamilyType::GPGPU_CSR_BASE_ADDRESS GPGPU_CSR_BASE_ADDRESS;
auto &csr = pDevice->getUltCommandStreamReceiver<FamilyType>();
csr.getMemoryManager()->setForce32BitAllocations(false);
csr.setMediaVFEStateDirty(false);
auto csrSurface = csr.getPreemptionCsrAllocation();
ASSERT_NE(nullptr, csrSurface);
HardwareParse hwParser;
size_t off[3] = {0, 0, 0};
size_t gws[3] = {1, 1, 1};
MockKernelWithInternals mockKernel(*pDevice);
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr);
hwParser.parseCommands<FamilyType>(csr.commandStream);
hwParser.findHardwareCommands<FamilyType>();
auto offset = csr.commandStream.getUsed();
bool foundOneLri = false;
for (auto it : hwParser.lriList) {
auto cmdLri = genCmdCast<MI_LOAD_REGISTER_IMM *>(it);
if (cmdLri->getRegisterOffset() == 0x2580u) {
EXPECT_FALSE(foundOneLri);
foundOneLri = true;
}
}
EXPECT_TRUE(foundOneLri);
hwParser.findCsrBaseAddress<FamilyType>();
ASSERT_NE(nullptr, hwParser.cmdGpgpuCsrBaseAddress);
auto cmdCsr = genCmdCast<GPGPU_CSR_BASE_ADDRESS *>(hwParser.cmdGpgpuCsrBaseAddress);
ASSERT_NE(nullptr, cmdCsr);
EXPECT_EQ(csrSurface->getGpuAddressToPatch(), cmdCsr->getGpgpuCsrBaseAddress());
hwParser.cmdList.clear();
hwParser.lriList.clear();
hwParser.cmdGpgpuCsrBaseAddress = nullptr;
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, off, gws, nullptr, 0, nullptr, nullptr);
hwParser.parseCommands<FamilyType>(csr.commandStream, offset);
hwParser.findHardwareCommands<FamilyType>();
for (auto it : hwParser.lriList) {
auto cmd = genCmdCast<MI_LOAD_REGISTER_IMM *>(it);
EXPECT_FALSE(cmd->getRegisterOffset() == 0x2580u);
}
hwParser.findCsrBaseAddress<FamilyType>();
EXPECT_EQ(nullptr, hwParser.cmdGpgpuCsrBaseAddress);
}
GEN10TEST_F(Gen10PreemptionEnqueueKernelTest, givenDisabledPreemptionWhenEnqueueKernelCalledThenPassDisabledPreemptionMode) {
pDevice->setPreemptionMode(PreemptionMode::Disabled);
WhitelistedRegisters regs = {};
pDevice->setForceWhitelistedRegs(true, &regs);
auto mockCsr = new MockCsrHw2<FamilyType>(*pDevice->executionEnvironment);
pDevice->resetCommandStreamReceiver(mockCsr);
MockKernelWithInternals mockKernel(*pDevice);
EXPECT_EQ(PreemptionMode::Disabled, PreemptionHelper::taskPreemptionMode(*pDevice, mockKernel.mockKernel));
size_t gws[3] = {1, 0, 0};
pCmdQ->enqueueKernel(mockKernel.mockKernel, 1, nullptr, gws, nullptr, 0, nullptr, nullptr);
pCmdQ->flush();
EXPECT_EQ(1, mockCsr->flushCalledCount);
EXPECT_EQ(PreemptionMode::Disabled, mockCsr->passedDispatchFlags.preemptionMode);
}
GEN10TEST_F(Gen10PreemptionTests, getRequiredCmdQSize) {
size_t expectedSize = 0;
EXPECT_EQ(expectedSize, PreemptionHelper::getPreemptionWaCsSize<FamilyType>(*device));
}
GEN10TEST_F(Gen10PreemptionTests, applyPreemptionWaCmds) {
size_t usedSize = 0;
auto &cmdStream = cmdQ->getCS(0);
PreemptionHelper::applyPreemptionWaCmdsBegin<FamilyType>(&cmdStream, *device);
EXPECT_EQ(usedSize, cmdStream.getUsed());
PreemptionHelper::applyPreemptionWaCmdsEnd<FamilyType>(&cmdStream, *device);
EXPECT_EQ(usedSize, cmdStream.getUsed());
}
GEN10TEST_F(Gen10PreemptionTests, givenInterfaceDescriptorDataWhenMidThreadPreemptionModeThenSetDisableThreadPreemptionBitToDisable) {
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
INTERFACE_DESCRIPTOR_DATA iddArg;
iddArg = FamilyType::cmdInitInterfaceDescriptorData;
iddArg.setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE);
PreemptionHelper::programInterfaceDescriptorDataPreemption<FamilyType>(&iddArg, PreemptionMode::MidThread);
EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE, iddArg.getThreadPreemptionDisable());
}
GEN10TEST_F(Gen10PreemptionTests, givenInterfaceDescriptorDataWhenNoMidThreadPreemptionModeThenSetDisableThreadPreemptionBitToEnable) {
using INTERFACE_DESCRIPTOR_DATA = typename FamilyType::INTERFACE_DESCRIPTOR_DATA;
INTERFACE_DESCRIPTOR_DATA iddArg;
iddArg = FamilyType::cmdInitInterfaceDescriptorData;
iddArg.setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE);
PreemptionHelper::programInterfaceDescriptorDataPreemption<FamilyType>(&iddArg, PreemptionMode::Disabled);
EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE, iddArg.getThreadPreemptionDisable());
iddArg.setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE);
PreemptionHelper::programInterfaceDescriptorDataPreemption<FamilyType>(&iddArg, PreemptionMode::MidBatch);
EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE, iddArg.getThreadPreemptionDisable());
iddArg.setThreadPreemptionDisable(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_DISABLE);
PreemptionHelper::programInterfaceDescriptorDataPreemption<FamilyType>(&iddArg, PreemptionMode::ThreadGroup);
EXPECT_EQ(INTERFACE_DESCRIPTOR_DATA::THREAD_PREEMPTION_DISABLE_ENABLE, iddArg.getThreadPreemptionDisable());
}
GEN10TEST_F(Gen10PreemptionTests, givenMidThreadPreemptionModeWhenStateSipIsProgrammedThenSipEqualsSipAllocationGpuAddressToPatch) {
using STATE_SIP = typename FamilyType::STATE_SIP;
auto mockDevice = std::unique_ptr<MockDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
mockDevice->setPreemptionMode(PreemptionMode::MidThread);
auto cmdSizePreemptionMidThread = PreemptionHelper::getRequiredStateSipCmdSize<FamilyType>(*mockDevice);
StackVec<char, 4096> preemptionBuffer;
preemptionBuffer.resize(cmdSizePreemptionMidThread);
LinearStream preemptionStream(&*preemptionBuffer.begin(), preemptionBuffer.size());
PreemptionHelper::programStateSip<FamilyType>(preemptionStream, *mockDevice);
HardwareParse hwParserOnlyPreemption;
hwParserOnlyPreemption.parseCommands<FamilyType>(preemptionStream, 0);
auto cmd = hwParserOnlyPreemption.getCommand<STATE_SIP>();
EXPECT_NE(nullptr, cmd);
auto sipType = SipKernel::getSipKernelType(mockDevice->getHardwareInfo().platform.eRenderCoreFamily, mockDevice->isSourceLevelDebuggerActive());
EXPECT_EQ(mockDevice->getExecutionEnvironment()->getBuiltIns()->getSipKernel(sipType, *mockDevice).getSipAllocation()->getGpuAddressToPatch(), cmd->getSystemInstructionPointer());
}

View File

@ -1,25 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "test.h"
#include "unit_tests/fixtures/device_fixture.h"
using namespace NEO;
typedef Test<DeviceFixture> CannonlakeOnlyTest;
CNLTEST_F(CannonlakeOnlyTest, shouldPassOnCnl) {
EXPECT_EQ(IGFX_CANNONLAKE, pDevice->getHardwareInfo().platform.eProductFamily);
}
typedef Test<DeviceFixture> Gen10OnlyTest;
GEN10TEST_F(Gen10OnlyTest, shouldPassOnGen10) {
EXPECT_NE(IGFX_GEN8_CORE, pDevice->getRenderCoreFamily());
EXPECT_NE(IGFX_GEN9_CORE, pDevice->getRenderCoreFamily());
EXPECT_EQ(IGFX_GEN10_CORE, pDevice->getRenderCoreFamily());
}

View File

@ -1,15 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/gen10/hw_info.h"
#include "unit_tests/helpers/unit_test_helper.h"
#include "unit_tests/helpers/unit_test_helper.inl"
namespace NEO {
template struct UnitTestHelper<CNLFamily>;
} // namespace NEO

View File

@ -1,15 +0,0 @@
#
# Copyright (C) 2017-2018 Intel Corporation
#
# SPDX-License-Identifier: MIT
#
set(IGDRCL_SRCS_tests_gen10_windows
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/gmm_callbacks_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_config_tests_gen10.cpp
${CMAKE_CURRENT_SOURCE_DIR}/os_interface_tests_gen10.cpp
)
if(WIN32)
target_sources(igdrcl_tests PRIVATE ${IGDRCL_SRCS_tests_gen10_windows})
endif()

View File

@ -1,21 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/gmm_callbacks.h"
#include "test.h"
using namespace NEO;
typedef ::testing::Test Gen10GmmCallbacksTests;
GEN10TEST_F(Gen10GmmCallbacksTests, notSupportedDeviceCallback) {
EXPECT_EQ(0, DeviceCallbacks<FamilyType>::notifyAubCapture(nullptr, 0, 0, false));
}
GEN10TEST_F(Gen10GmmCallbacksTests, notSupportedTTCallback) {
EXPECT_EQ(0, TTCallbacks<FamilyType>::writeL3Address(nullptr, 1, 2));
}

View File

@ -1,24 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/os_interface/windows/os_interface.h"
#include "unit_tests/os_interface/windows/hw_info_config_win_tests.h"
using namespace NEO;
using namespace std;
using HwInfoConfigTestWindowsCnl = HwInfoConfigTestWindows;
CNLTEST_F(HwInfoConfigTestWindowsCnl, whenCallAdjustPlatformThenDoNothing) {
EXPECT_EQ(IGFX_CANNONLAKE, productFamily);
auto hwInfoConfig = HwInfoConfig::get(productFamily);
outHwInfo = pInHwInfo;
hwInfoConfig->adjustPlatformForProductFamily(&outHwInfo);
int ret = memcmp(&outHwInfo.platform, &pInHwInfo.platform, sizeof(PLATFORM));
EXPECT_EQ(0, ret);
}

View File

@ -1,31 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/execution_environment/execution_environment.h"
#include "test.h"
#include "unit_tests/os_interface/windows/os_interface_win_tests.h"
typedef OsInterfaceTest OsInterfaceTestCnl;
GEN10TEST_F(OsInterfaceTestCnl, askKmdIfPreemptionRegisterWhitelisted) {
size_t numDevices = 0;
ExecutionEnvironment executionEnvironment;
bool success = DeviceFactory::getDevices(numDevices, executionEnvironment);
EXPECT_TRUE(success);
auto hwInfo = executionEnvironment.getHardwareInfo();
for (size_t i = 0u; i < numDevices; i++) {
if (hwInfo[i].workaroundTable.waEnablePreemptionGranularityControlByUMD) {
EXPECT_TRUE(hwInfo[i].capabilityTable.whitelistedRegisters.csChicken1_0x2580);
} else {
EXPECT_FALSE(hwInfo[i].capabilityTable.whitelistedRegisters.csChicken1_0x2580);
}
}
DeviceFactory::releaseDevices();
}

View File

@ -20,6 +20,5 @@ typedef Test<DeviceFixture> Gen11OnlyTeset;
GEN11TEST_F(Gen11OnlyTeset, shouldPassOnGen11) {
EXPECT_NE(IGFX_GEN9_CORE, pDevice->getRenderCoreFamily());
EXPECT_NE(IGFX_GEN10_CORE, pDevice->getRenderCoreFamily());
EXPECT_EQ(IGFX_GEN11_CORE, pDevice->getRenderCoreFamily());
}

View File

@ -21,5 +21,4 @@ typedef Test<DeviceFixture> Gen8OnlyTest;
GEN8TEST_F(Gen8OnlyTest, shouldPassOnGen8) {
EXPECT_EQ(IGFX_GEN8_CORE, pDevice->getRenderCoreFamily());
EXPECT_NE(IGFX_GEN9_CORE, pDevice->getRenderCoreFamily());
EXPECT_NE(IGFX_GEN10_CORE, pDevice->getRenderCoreFamily());
}

View File

@ -15,5 +15,4 @@ typedef Test<DeviceFixture> Gen9OnlyTest;
GEN9TEST_F(Gen9OnlyTest, shouldPassOnGen9) {
EXPECT_NE(IGFX_GEN8_CORE, pDevice->getRenderCoreFamily());
EXPECT_EQ(IGFX_GEN9_CORE, pDevice->getRenderCoreFamily());
EXPECT_NE(IGFX_GEN10_CORE, pDevice->getRenderCoreFamily());
}

View File

@ -36,11 +36,3 @@ HWCMDTEST_F(IGFX_GEN8_CORE, ExcludeTestSkl, givenHwCmdTestWhenSklExcludedDontRun
HWTEST_F(ExcludeTestSkl, givenHwTestWhenSklExcludedDontRunOnSkl) {
EXPECT_NE(IGFX_SKYLAKE, ::productFamily);
}
using ExcludeTestCnl = ExcludeTest<IGFX_CANNONLAKE>;
HWCMDTEST_F(IGFX_GEN8_CORE, ExcludeTestCnl, givenHwCmdTestWhenCnlExcludedDontRunOnCnl) {
EXPECT_NE(IGFX_CANNONLAKE, ::productFamily);
}
HWTEST_F(ExcludeTestCnl, givenHwTestWhenCnlExcludedDontRunOnCnl) {
EXPECT_NE(IGFX_CANNONLAKE, ::productFamily);
}

View File

@ -11,5 +11,3 @@ HWCMDTEST_EXCLUDE_FAMILY(ExcludeTestBdw, givenHwCmdTestWhenBdwExcludedDontRunOnB
HWCMDTEST_EXCLUDE_FAMILY(ExcludeTestBdw, givenHwTestWhenBdwExcludedDontRunOnBdw, IGFX_BROADWELL);
HWCMDTEST_EXCLUDE_FAMILY(ExcludeTestSkl, givenHwCmdTestWhenSklExcludedDontRunOnSkl, IGFX_SKYLAKE);
HWCMDTEST_EXCLUDE_FAMILY(ExcludeTestSkl, givenHwTestWhenSklExcludedDontRunOnSkl, IGFX_SKYLAKE);
HWCMDTEST_EXCLUDE_FAMILY(ExcludeTestCnl, givenHwCmdTestWhenCnlExcludedDontRunOnCnl, IGFX_CANNONLAKE);
HWCMDTEST_EXCLUDE_FAMILY(ExcludeTestCnl, givenHwTestWhenCnlExcludedDontRunOnCnl, IGFX_CANNONLAKE);

View File

@ -38,15 +38,6 @@ extern GFXCORE_FAMILY renderCoreFamily;
#define SKL_TYPED_CMDTEST_BODY
#define SKL_SUPPORTED_TEST(cmdSetBase) false
#endif
#ifdef TESTS_GEN10
#define CNL_TYPED_TEST_BODY testBodyHw<typename NEO::GfxFamilyMapper<IGFX_GEN10_CORE>::GfxFamily>();
#define CNL_TYPED_CMDTEST_BODY runCmdTestHwIfSupported<typename NEO::GfxFamilyMapper<IGFX_GEN10_CORE>::GfxFamily>();
#define CNL_SUPPORTED_TEST(cmdSetBase) NEO::GfxFamilyMapper<IGFX_GEN10_CORE>::GfxFamily::supportsCmdSet(cmdSetBase)
#else
#define CNL_TYPED_TEST_BODY
#define CNL_TYPED_CMDTEST_BODY
#define CNL_SUPPORTED_TEST(cmdSetBase) false
#endif
#ifdef TESTS_GEN11
#define ICL_TYPED_TEST_BODY testBodyHw<typename NEO::GfxFamilyMapper<IGFX_GEN11_CORE>::GfxFamily>();
#define ICL_TYPED_CMDTEST_BODY runCmdTestHwIfSupported<typename NEO::GfxFamilyMapper<IGFX_GEN11_CORE>::GfxFamily>();
@ -166,9 +157,6 @@ extern GFXCORE_FAMILY renderCoreFamily;
case IGFX_GEN9_CORE: \
SKL_TYPED_TEST_BODY \
break; \
case IGFX_GEN10_CORE: \
CNL_TYPED_TEST_BODY \
break; \
case IGFX_GEN11_CORE: \
ICL_TYPED_TEST_BODY \
break; \
@ -213,9 +201,6 @@ extern GFXCORE_FAMILY renderCoreFamily;
case IGFX_GEN9_CORE: \
supported = SKL_SUPPORTED_TEST(cmdSetBase); \
break; \
case IGFX_GEN10_CORE: \
supported = CNL_SUPPORTED_TEST(cmdSetBase); \
break; \
case IGFX_GEN11_CORE: \
supported = ICL_SUPPORTED_TEST(cmdSetBase); \
break; \
@ -285,9 +270,6 @@ extern GFXCORE_FAMILY renderCoreFamily;
case IGFX_GEN9_CORE: \
SKL_TYPED_CMDTEST_BODY \
break; \
case IGFX_GEN10_CORE: \
CNL_TYPED_CMDTEST_BODY \
break; \
case IGFX_GEN11_CORE: \
ICL_TYPED_CMDTEST_BODY \
break; \
@ -417,9 +399,6 @@ extern GFXCORE_FAMILY renderCoreFamily;
case IGFX_GEN9_CORE: \
SKL_TYPED_TEST_BODY \
break; \
case IGFX_GEN10_CORE: \
CNL_TYPED_TEST_BODY \
break; \
case IGFX_GEN11_CORE: \
ICL_TYPED_TEST_BODY \
break; \
@ -477,9 +456,6 @@ extern GFXCORE_FAMILY renderCoreFamily;
case IGFX_GEN9_CORE: \
SKL_TYPED_CMDTEST_BODY \
break; \
case IGFX_GEN10_CORE: \
CNL_TYPED_CMDTEST_BODY \
break; \
case IGFX_GEN11_CORE: \
ICL_TYPED_CMDTEST_BODY \
break; \
@ -577,16 +553,6 @@ extern GFXCORE_FAMILY renderCoreFamily;
IGFX_GEN9_CORE, \
IGFX_MAX_PRODUCT)
#endif
#ifdef TESTS_GEN10
#define GEN10TEST_F(test_fixture, test_name) \
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
::testing::internal::GetTypeId<test_fixture>(), \
IGFX_GEN10_CORE, IGFX_MAX_PRODUCT)
#define GEN10TEST_P(test_suite_name, test_name) \
FAMILYTEST_TEST_P(test_suite_name, test_name, \
IGFX_GEN10_CORE, \
IGFX_MAX_PRODUCT)
#endif
#ifdef TESTS_GEN11
#define GEN11TEST_F(test_fixture, test_name) \
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
@ -658,16 +624,6 @@ extern GFXCORE_FAMILY renderCoreFamily;
IGFX_GEN9_CORE, \
IGFX_COFFEELAKE)
#endif
#ifdef TESTS_GEN10
#define CNLTEST_F(test_fixture, test_name) \
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
::testing::internal::GetTypeId<test_fixture>(), \
IGFX_GEN10_CORE, IGFX_CANNONLAKE)
#define CNLTEST_P(test_suite_name, test_name) \
FAMILYTEST_TEST_P(test_suite_name, test_name, \
IGFX_GEN10_CORE, \
IGFX_CANNONLAKE)
#endif
#ifdef TESTS_GEN11
#define ICLLPTEST_F(test_fixture, test_name) \
FAMILYTEST_TEST_(test_fixture, test_name, test_fixture, \
@ -704,9 +660,6 @@ extern GFXCORE_FAMILY renderCoreFamily;
case IGFX_GEN9_CORE: \
SKL_TYPED_TEST_BODY \
break; \
case IGFX_GEN10_CORE: \
CNL_TYPED_TEST_BODY \
break; \
case IGFX_GEN11_CORE: \
ICL_TYPED_TEST_BODY \
break; \

View File

@ -1,33 +0,0 @@
/*
* Copyright (C) 2017-2019 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "runtime/helpers/base_object.h"
#include "unit_tests/libult/ult_command_stream_receiver.h"
namespace NEO {
typedef CNLFamily Family;
static auto gfxCore = IGFX_GEN10_CORE;
extern CommandStreamReceiverCreateFunc commandStreamReceiverFactory[2 * IGFX_MAX_CORE];
template <>
void populateFactoryTable<UltCommandStreamReceiver<Family>>() {
commandStreamReceiverFactory[IGFX_MAX_CORE + gfxCore] = UltCommandStreamReceiver<Family>::create;
}
struct enableGen10 {
enableGen10() {
populateFactoryTable<UltCommandStreamReceiver<Family>>();
}
};
static enableGen10 enable;
template class UltCommandStreamReceiver<CNLFamily>;
} // namespace NEO