mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-22 10:17:01 +08:00
refactor: correct naming of enum class constants 10/n
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
a6458433dc
commit
de93bc6928
@@ -418,7 +418,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendLaunchK
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::KernelName) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::kernelName) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -434,7 +434,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendLaunchK
|
||||
tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameBegin) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameBegin) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -450,7 +450,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendLaunchK
|
||||
tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameEnd) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameEnd) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -505,7 +505,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendEventRe
|
||||
bool tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameBegin) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameBegin) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -521,7 +521,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendEventRe
|
||||
tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameEnd) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameEnd) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -579,7 +579,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendSignalE
|
||||
bool tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameBegin) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameBegin) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -595,7 +595,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendSignalE
|
||||
tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameEnd) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameEnd) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -653,7 +653,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendWaitOnE
|
||||
bool tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameBegin) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameBegin) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -669,7 +669,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendWaitOnE
|
||||
tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameEnd) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameEnd) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -713,7 +713,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendMemoryC
|
||||
bool tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameBegin) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameBegin) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -729,7 +729,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendMemoryC
|
||||
tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameEnd) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameEnd) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -774,7 +774,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendMemoryC
|
||||
bool tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameBegin) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameBegin) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
@@ -790,7 +790,7 @@ HWTEST_F(CommandListAppendLaunchKernelSWTags, givenEnableSWTagsWhenAppendMemoryC
|
||||
tagFound = false;
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::CallNameEnd) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::callNameEnd) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
|
||||
@@ -1047,7 +1047,7 @@ HWTEST_F(CommandQueueExecuteCommandListSWTagsTests, givenEnableSWTagsAndCommandL
|
||||
for (auto it = noops.begin(); it != noops.end() && !tagFound; ++it) {
|
||||
|
||||
auto noop = genCmdCast<MI_NOOP *>(*(*it));
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::PipeControlReason) == noop->getIdentificationNumber() &&
|
||||
if (NEO::SWTags::BaseTag::getMarkerNoopID(SWTags::OpCode::pipeControlReason) == noop->getIdentificationNumber() &&
|
||||
noop->getIdentificationNumberRegisterWriteEnable() == true &&
|
||||
++it != noops.end()) {
|
||||
|
||||
|
||||
@@ -614,7 +614,7 @@ HWTEST_F(NotifyModuleLoadTest, givenDebuggingEnabledWhenModuleIsCreatedAndFullyL
|
||||
auto debugger = MockDebuggerL0Hw<FamilyType>::allocate(neoDevice);
|
||||
neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0]->debugger.reset(debugger);
|
||||
|
||||
auto elfAdditionalSections = {ZebinTestData::appendElfAdditionalSection::CONSTANT}; // for const surface allocation copy
|
||||
auto elfAdditionalSections = {ZebinTestData::appendElfAdditionalSection::constant}; // for const surface allocation copy
|
||||
auto zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device->getHwInfo(), elfAdditionalSections);
|
||||
const auto &src = zebinData->storage;
|
||||
|
||||
|
||||
@@ -719,7 +719,7 @@ TEST_F(KernelImmutableDataIsaCopyTests, whenUserKernelIsCreatedThenIsaIsCopiedWh
|
||||
|
||||
std::unique_ptr<MockImmutableData> mockKernelImmData = std::make_unique<MockImmutableData>(perHwThreadPrivateMemorySizeRequested);
|
||||
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::GLOBAL};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::global};
|
||||
createModuleFromMockBinary(perHwThreadPrivateMemorySizeRequested, isInternal, mockKernelImmData.get(), additionalSections);
|
||||
|
||||
size_t copyForGlobalSurface = 1u;
|
||||
@@ -799,7 +799,7 @@ TEST_F(KernelImmutableDataTests, givenInternalModuleWhenKernelIsCreatedThenIsaIs
|
||||
size_t previouscopyMemoryToAllocationCalledTimes =
|
||||
mockMemoryManager->copyMemoryToAllocationCalledTimes;
|
||||
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::GLOBAL};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::global};
|
||||
createModuleFromMockBinary(perHwThreadPrivateMemorySizeRequested, isInternal, mockKernelImmData.get(), additionalSections);
|
||||
|
||||
size_t copyForGlobalSurface = 1u;
|
||||
@@ -1928,7 +1928,7 @@ using KernelIsaTests = Test<KernelIsaFixture>;
|
||||
|
||||
TEST_F(KernelIsaTests, givenKernelAllocationInLocalMemoryWhenCreatingWithoutAllowedCpuAccessThenUseBcsForTransfer) {
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
debugManager.flags.ForceNonSystemMemoryPlacement.set(1 << (static_cast<int64_t>(NEO::AllocationType::kernelIsa) - 1));
|
||||
this->createModuleFromMockBinary(ModuleType::user);
|
||||
|
||||
@@ -1945,7 +1945,7 @@ TEST_F(KernelIsaTests, givenKernelAllocationInLocalMemoryWhenCreatingWithoutAllo
|
||||
|
||||
TEST_F(KernelIsaTests, givenKernelAllocationInLocalMemoryWhenCreatingWithAllowedCpuAccessThenDontUseBcsForTransfer) {
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessAllowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessAllowed));
|
||||
debugManager.flags.ForceNonSystemMemoryPlacement.set(1 << (static_cast<int64_t>(NEO::AllocationType::kernelIsa) - 1));
|
||||
this->createModuleFromMockBinary(ModuleType::user);
|
||||
|
||||
@@ -1957,7 +1957,7 @@ TEST_F(KernelIsaTests, givenKernelAllocationInLocalMemoryWhenCreatingWithAllowed
|
||||
|
||||
TEST_F(KernelIsaTests, givenKernelAllocationInLocalMemoryWhenCreatingWithDisallowedCpuAccessAndDisabledBlitterThenFallbackToCpuCopy) {
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
debugManager.flags.ForceNonSystemMemoryPlacement.set(1 << (static_cast<int64_t>(NEO::AllocationType::kernelIsa) - 1));
|
||||
this->createModuleFromMockBinary(ModuleType::user);
|
||||
|
||||
|
||||
@@ -643,7 +643,7 @@ struct ModuleSpecConstantsFixture : public DeviceFixture {
|
||||
}
|
||||
|
||||
void runTest() {
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::SPIRV};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::spirv};
|
||||
zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device->getHwInfo(), additionalSections);
|
||||
const auto &src = zebinData->storage;
|
||||
|
||||
@@ -682,7 +682,7 @@ struct ModuleSpecConstantsFixture : public DeviceFixture {
|
||||
}
|
||||
|
||||
void runTestStatic() {
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::SPIRV};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::spirv};
|
||||
zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device->getHwInfo(), additionalSections);
|
||||
const auto &src = zebinData->storage;
|
||||
|
||||
@@ -775,7 +775,7 @@ TEST_F(ModuleSpecConstantsLongTests, givenSpecializationConstantsSetWhenCompiler
|
||||
mockCompiler = new FailingMockCompilerInterfaceWithSpecConstants(moduleNumSpecConstants);
|
||||
auto rootDeviceEnvironment = neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0].get();
|
||||
rootDeviceEnvironment->compilerInterface.reset(mockCompiler);
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::SPIRV};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::spirv};
|
||||
auto zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device->getHwInfo(), additionalSections);
|
||||
const auto &src = zebinData->storage;
|
||||
|
||||
@@ -806,7 +806,7 @@ TEST_F(ModuleSpecConstantsLongTests, givenSpecializationConstantsSetWhenCompiler
|
||||
}
|
||||
|
||||
TEST_F(ModuleSpecConstantsLongTests, givenSpecializationConstantsSetWhenUserPassTooMuchConstsIdsThenModuleInitFails) {
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::SPIRV};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::spirv};
|
||||
auto zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device->getHwInfo(), additionalSections);
|
||||
const auto &src = zebinData->storage;
|
||||
|
||||
@@ -862,7 +862,7 @@ TEST_F(ModuleSpecConstantsLongTests, givenSpecializationConstantsSetWhenCompiler
|
||||
mockCompiler = new FailingMockCompilerInterfaceWithSpecConstants(moduleNumSpecConstants);
|
||||
auto rootDeviceEnvironment = neoDevice->getExecutionEnvironment()->rootDeviceEnvironments[0].get();
|
||||
rootDeviceEnvironment->compilerInterface.reset(mockCompiler);
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::SPIRV};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::spirv};
|
||||
auto zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device->getHwInfo(), additionalSections);
|
||||
const auto &src = zebinData->storage;
|
||||
|
||||
@@ -925,7 +925,7 @@ struct ModuleStaticLinkFixture : public DeviceFixture {
|
||||
}
|
||||
|
||||
void loadModules(bool multiple) {
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::SPIRV};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::spirv};
|
||||
zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device->getHwInfo(), additionalSections);
|
||||
const auto &storage = zebinData->storage;
|
||||
|
||||
@@ -2846,7 +2846,7 @@ HWTEST_F(ModuleTranslationUnitTest, GivenRebuildFlagWhenCreatingModuleFromNative
|
||||
DebugManagerStateRestore dgbRestorer;
|
||||
NEO::debugManager.flags.RebuildPrecompiledKernels.set(true);
|
||||
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::SPIRV};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::spirv};
|
||||
bool forceRecompilation = true;
|
||||
auto zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device->getHwInfo(), additionalSections, forceRecompilation);
|
||||
const auto &src = zebinData->storage;
|
||||
@@ -2881,7 +2881,7 @@ HWTEST_F(ModuleTranslationUnitTest, GivenRebuildFlagWhenCreatingModuleFromNative
|
||||
DebugManagerStateRestore dgbRestorer;
|
||||
NEO::debugManager.flags.RebuildPrecompiledKernels.set(true);
|
||||
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::SPIRV};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::spirv};
|
||||
bool forceRecompilation = true;
|
||||
auto zebinData = std::make_unique<ZebinTestData::ZebinWithL0TestCommonModule>(device->getHwInfo(), additionalSections, forceRecompilation);
|
||||
const auto &src = zebinData->storage;
|
||||
@@ -4525,7 +4525,7 @@ TEST_F(ModuleIsaCopyTest, whenModuleIsInitializedThenIsaIsCopied) {
|
||||
|
||||
uint32_t previouscopyMemoryToAllocationCalledTimes = mockMemoryManager->copyMemoryToAllocationCalledTimes;
|
||||
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::GLOBAL};
|
||||
auto additionalSections = {ZebinTestData::appendElfAdditionalSection::global};
|
||||
createModuleFromMockBinary(perHwThreadPrivateMemorySizeRequested, isInternal, mockKernelImmData.get(), additionalSections);
|
||||
|
||||
uint32_t numOfKernels = static_cast<uint32_t>(module->getKernelImmutableDataVector().size());
|
||||
|
||||
@@ -32,7 +32,7 @@ class BuiltInOp<EBuiltInOps::auxTranslation> : public BuiltinDispatchInfoBuilder
|
||||
multiDispatchInfo.setBuiltinOpParams(operationParams);
|
||||
|
||||
for (auto &kernelObj : *multiDispatchInfo.getKernelObjsForAuxTranslation()) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::NoSplit> builder(clDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::noSplit> builder(clDevice);
|
||||
|
||||
UNRECOVERABLE_IF(builder.getMaxNumDispatches() != 1);
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ class BuiltInOp<EBuiltInOps::copyBufferToBuffer> : public BuiltinDispatchInfoBui
|
||||
: BuiltInOp(kernelsLib, device, true) {}
|
||||
template <typename OffsetType>
|
||||
bool buildDispatchInfosTyped(MultiDispatchInfo &multiDispatchInfo) const {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::KernelSplit> kernelSplit1DBuilder(clDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::kernelSplit> kernelSplit1DBuilder(clDevice);
|
||||
auto &operationParams = multiDispatchInfo.peekBuiltinOpParams();
|
||||
|
||||
uintptr_t start = reinterpret_cast<uintptr_t>(operationParams.dstPtr) + operationParams.dstOffset.x;
|
||||
@@ -60,13 +60,13 @@ class BuiltInOp<EBuiltInOps::copyBufferToBuffer> : public BuiltinDispatchInfoBui
|
||||
uint32_t rootDeviceIndex = clDevice.getRootDeviceIndex();
|
||||
|
||||
// Set-up ISA
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::Left, kernLeftLeftover->getKernel(rootDeviceIndex));
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::left, kernLeftLeftover->getKernel(rootDeviceIndex));
|
||||
if (isSrcMisaligned) {
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::Middle, kernMiddleMisaligned->getKernel(rootDeviceIndex));
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::middle, kernMiddleMisaligned->getKernel(rootDeviceIndex));
|
||||
} else {
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::Middle, kernMiddle->getKernel(rootDeviceIndex));
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::middle, kernMiddle->getKernel(rootDeviceIndex));
|
||||
}
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::Right, kernRightLeftover->getKernel(rootDeviceIndex));
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::right, kernRightLeftover->getKernel(rootDeviceIndex));
|
||||
|
||||
// Set-up common kernel args
|
||||
if (operationParams.srcSvmAlloc) {
|
||||
@@ -93,24 +93,24 @@ class BuiltInOp<EBuiltInOps::copyBufferToBuffer> : public BuiltinDispatchInfoBui
|
||||
kernelSplit1DBuilder.setUnifiedMemorySyncRequirement(operationParams.unifiedMemoryArgsRequireMemSync);
|
||||
|
||||
// Set-up srcOffset
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Left, 2, static_cast<OffsetType>(operationParams.srcOffset.x));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Middle, 2, static_cast<OffsetType>(operationParams.srcOffset.x + leftSize));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Right, 2, static_cast<OffsetType>(operationParams.srcOffset.x + leftSize + middleSizeBytes));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::left, 2, static_cast<OffsetType>(operationParams.srcOffset.x));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::middle, 2, static_cast<OffsetType>(operationParams.srcOffset.x + leftSize));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::right, 2, static_cast<OffsetType>(operationParams.srcOffset.x + leftSize + middleSizeBytes));
|
||||
|
||||
// Set-up dstOffset
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Left, 3, static_cast<OffsetType>(operationParams.dstOffset.x));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Middle, 3, static_cast<OffsetType>(operationParams.dstOffset.x + leftSize));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Right, 3, static_cast<OffsetType>(operationParams.dstOffset.x + leftSize + middleSizeBytes));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::left, 3, static_cast<OffsetType>(operationParams.dstOffset.x));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::middle, 3, static_cast<OffsetType>(operationParams.dstOffset.x + leftSize));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::right, 3, static_cast<OffsetType>(operationParams.dstOffset.x + leftSize + middleSizeBytes));
|
||||
|
||||
if (isSrcMisaligned) {
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Middle, 4, static_cast<uint32_t>(srcMisalignment * 8));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::middle, 4, static_cast<uint32_t>(srcMisalignment * 8));
|
||||
}
|
||||
|
||||
// Set-up work sizes
|
||||
// Note for split walker, it would be just builder.SetDipatchGeometry(GWS, ELWS, OFFSET)
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::Left, Vec3<size_t>{leftSize, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::Middle, Vec3<size_t>{middleSizeEls, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::Right, Vec3<size_t>{rightSize, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::left, Vec3<size_t>{leftSize, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::middle, Vec3<size_t>{middleSizeEls, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::right, Vec3<size_t>{rightSize, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.bake(multiDispatchInfo);
|
||||
|
||||
return true;
|
||||
@@ -164,7 +164,7 @@ class BuiltInOp<EBuiltInOps::copyBufferRect> : public BuiltinDispatchInfoBuilder
|
||||
|
||||
template <typename OffsetType>
|
||||
bool buildDispatchInfosTyped(MultiDispatchInfo &multiDispatchInfo) const {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
auto &operationParams = multiDispatchInfo.peekBuiltinOpParams();
|
||||
|
||||
size_t hostPtrSize = 0;
|
||||
@@ -293,7 +293,7 @@ class BuiltInOp<EBuiltInOps::fillBuffer> : public BuiltinDispatchInfoBuilder {
|
||||
|
||||
template <typename OffsetType>
|
||||
bool buildDispatchInfosTyped(MultiDispatchInfo &multiDispatchInfo) const {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::KernelSplit> kernelSplit1DBuilder(clDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::kernelSplit> kernelSplit1DBuilder(clDevice);
|
||||
auto &operationParams = multiDispatchInfo.peekBuiltinOpParams();
|
||||
|
||||
uintptr_t start = reinterpret_cast<uintptr_t>(operationParams.dstPtr) + operationParams.dstOffset.x;
|
||||
@@ -315,9 +315,9 @@ class BuiltInOp<EBuiltInOps::fillBuffer> : public BuiltinDispatchInfoBuilder {
|
||||
uint32_t rootDeviceIndex = clDevice.getRootDeviceIndex();
|
||||
|
||||
// Set-up ISA
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::Left, kernLeftLeftover->getKernel(rootDeviceIndex));
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::Middle, kernMiddle->getKernel(rootDeviceIndex));
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::Right, kernRightLeftover->getKernel(rootDeviceIndex));
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::left, kernLeftLeftover->getKernel(rootDeviceIndex));
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::middle, kernMiddle->getKernel(rootDeviceIndex));
|
||||
kernelSplit1DBuilder.setKernel(SplitDispatch::RegionCoordX::right, kernRightLeftover->getKernel(rootDeviceIndex));
|
||||
|
||||
DEBUG_BREAK_IF((operationParams.srcMemObj == nullptr) || (operationParams.srcOffset != 0));
|
||||
DEBUG_BREAK_IF((operationParams.dstMemObj == nullptr) && (operationParams.dstSvmAlloc == nullptr));
|
||||
@@ -334,24 +334,24 @@ class BuiltInOp<EBuiltInOps::fillBuffer> : public BuiltinDispatchInfoBuilder {
|
||||
kernelSplit1DBuilder.setKernelDestinationArgumentInSystem(isDestinationInSystem);
|
||||
|
||||
// Set-up dstOffset
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Left, 1, static_cast<OffsetType>(operationParams.dstOffset.x));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Middle, 1, static_cast<OffsetType>(operationParams.dstOffset.x + leftSize));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Right, 1, static_cast<OffsetType>(operationParams.dstOffset.x + leftSize + middleSizeBytes));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::left, 1, static_cast<OffsetType>(operationParams.dstOffset.x));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::middle, 1, static_cast<OffsetType>(operationParams.dstOffset.x + leftSize));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::right, 1, static_cast<OffsetType>(operationParams.dstOffset.x + leftSize + middleSizeBytes));
|
||||
|
||||
// Set-up srcMemObj with pattern
|
||||
auto graphicsAllocation = operationParams.srcMemObj->getMultiGraphicsAllocation().getDefaultGraphicsAllocation();
|
||||
kernelSplit1DBuilder.setArgSvm(2, operationParams.srcMemObj->getSize(), reinterpret_cast<void *>(graphicsAllocation->getGpuAddressToPatch()), graphicsAllocation, CL_MEM_READ_ONLY);
|
||||
|
||||
// Set-up patternSizeInEls
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Left, 3, static_cast<OffsetType>(operationParams.srcMemObj->getSize()));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Middle, 3, static_cast<OffsetType>(operationParams.srcMemObj->getSize() / middleElSize));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::Right, 3, static_cast<OffsetType>(operationParams.srcMemObj->getSize()));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::left, 3, static_cast<OffsetType>(operationParams.srcMemObj->getSize()));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::middle, 3, static_cast<OffsetType>(operationParams.srcMemObj->getSize() / middleElSize));
|
||||
kernelSplit1DBuilder.setArg(SplitDispatch::RegionCoordX::right, 3, static_cast<OffsetType>(operationParams.srcMemObj->getSize()));
|
||||
|
||||
// Set-up work sizes
|
||||
// Note for split walker, it would be just builder.SetDipatchGeomtry(GWS, ELWS, OFFSET)
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::Left, Vec3<size_t>{leftSize, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::Middle, Vec3<size_t>{middleSizeEls, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::Right, Vec3<size_t>{rightSize, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::left, Vec3<size_t>{leftSize, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::middle, Vec3<size_t>{middleSizeEls, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.setDispatchGeometry(SplitDispatch::RegionCoordX::right, Vec3<size_t>{rightSize, 0, 0}, Vec3<size_t>{0, 0, 0}, Vec3<size_t>{0, 0, 0});
|
||||
kernelSplit1DBuilder.bake(multiDispatchInfo);
|
||||
|
||||
return true;
|
||||
@@ -420,7 +420,7 @@ class BuiltInOp<EBuiltInOps::copyBufferToImage3d> : public BuiltinDispatchInfoBu
|
||||
|
||||
template <typename OffsetType>
|
||||
bool buildDispatchInfosTyped(MultiDispatchInfo &multiDispatchInfo) const {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
auto &operationParams = multiDispatchInfo.peekBuiltinOpParams();
|
||||
|
||||
DEBUG_BREAK_IF(!(((operationParams.srcPtr != nullptr) || (operationParams.srcMemObj != nullptr)) && (operationParams.dstPtr == nullptr)));
|
||||
@@ -536,7 +536,7 @@ class BuiltInOp<EBuiltInOps::copyImage3dToBuffer> : public BuiltinDispatchInfoBu
|
||||
|
||||
template <typename OffsetType>
|
||||
bool buildDispatchInfosTyped(MultiDispatchInfo &multiDispatchInfo) const {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
auto &operationParams = multiDispatchInfo.peekBuiltinOpParams();
|
||||
|
||||
DEBUG_BREAK_IF(!((operationParams.srcPtr == nullptr) && ((operationParams.dstPtr != nullptr) || (operationParams.dstMemObj != nullptr))));
|
||||
@@ -641,7 +641,7 @@ class BuiltInOp<EBuiltInOps::copyImageToImage3d> : public BuiltinDispatchInfoBui
|
||||
}
|
||||
|
||||
bool buildDispatchInfos(MultiDispatchInfo &multiDispatchInfo) const override {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
auto &operationParams = multiDispatchInfo.peekBuiltinOpParams();
|
||||
|
||||
DEBUG_BREAK_IF(!((operationParams.srcPtr == nullptr) && (operationParams.dstPtr == nullptr)));
|
||||
@@ -706,7 +706,7 @@ class BuiltInOp<EBuiltInOps::fillImage3d> : public BuiltinDispatchInfoBuilder {
|
||||
}
|
||||
|
||||
bool buildDispatchInfos(MultiDispatchInfo &multiDispatchInfo) const override {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> kernelNoSplit3DBuilder(clDevice);
|
||||
auto &operationParams = multiDispatchInfo.peekBuiltinOpParams();
|
||||
DEBUG_BREAK_IF(!((operationParams.srcMemObj == nullptr) && (operationParams.srcPtr != nullptr) && (operationParams.dstPtr == nullptr)));
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ class VmeBuiltinDispatchInfoBuilder : public BuiltinDispatchInfoBuilder {
|
||||
Vec3<size_t> gws = {numThreadsX * simdWidth, 1, 1};
|
||||
Vec3<size_t> lws = {vmeKernel->getKernelInfo().kernelDescriptor.kernelAttributes.requiredWorkgroupSize[0], 1, 1};
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::NoSplit> builder(clDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::noSplit> builder(clDevice);
|
||||
builder.setDispatchGeometry(gws, lws, inOffset, gws, lws);
|
||||
builder.setKernel(vmeKernel);
|
||||
builder.bake(multiDispatchInfo);
|
||||
|
||||
@@ -83,7 +83,7 @@ cl_int CommandQueueHw<GfxFamily>::enqueueHandler(Surface *(&surfaces)[surfaceCou
|
||||
}
|
||||
|
||||
if (kernel->getKernelInfo().builtinDispatchBuilder == nullptr) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::WalkerSplit> builder(getClDevice());
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::walkerSplit> builder(getClDevice());
|
||||
builder.setDispatchGeometry(workDim, workItems, enqueuedWorkSizes, globalOffsets, Vec3<size_t>{0, 0, 0}, localWorkSizesIn);
|
||||
builder.setKernel(kernel);
|
||||
builder.bake(multiDispatchInfo);
|
||||
|
||||
@@ -22,16 +22,16 @@ enum class Dim : uint32_t {
|
||||
};
|
||||
|
||||
enum class SplitMode : uint32_t {
|
||||
NoSplit = 0,
|
||||
WalkerSplit = 1, // 1 kernel and many GPGPU walkers (e.g. for non-uniform workgroup sizes)
|
||||
KernelSplit = 2 // many kernels and many GPGPU walkers (e.g. for copy kernels)
|
||||
noSplit = 0,
|
||||
walkerSplit = 1, // 1 kernel and many GPGPU walkers (e.g. for non-uniform workgroup sizes)
|
||||
kernelSplit = 2 // many kernels and many GPGPU walkers (e.g. for copy kernels)
|
||||
};
|
||||
|
||||
// Left | Middle | Right
|
||||
enum class RegionCoordX : uint32_t {
|
||||
Left = 0,
|
||||
Middle = 1,
|
||||
Right = 2
|
||||
left = 0,
|
||||
middle = 1,
|
||||
right = 2
|
||||
};
|
||||
|
||||
// Top
|
||||
@@ -40,18 +40,18 @@ enum class RegionCoordX : uint32_t {
|
||||
// ------
|
||||
// Bottom
|
||||
enum class RegionCoordY : uint32_t {
|
||||
Top = 0,
|
||||
Middle = 1,
|
||||
Bottom = 2
|
||||
top = 0,
|
||||
middle = 1,
|
||||
bottom = 2
|
||||
};
|
||||
|
||||
// Front / /
|
||||
// / Middle /
|
||||
// / / Back
|
||||
enum class RegionCoordZ : uint32_t {
|
||||
Front = 0,
|
||||
Middle = 1,
|
||||
Back = 2
|
||||
front = 0,
|
||||
middle = 1,
|
||||
back = 2
|
||||
};
|
||||
} // namespace SplitDispatch
|
||||
|
||||
@@ -101,18 +101,18 @@ class DispatchInfoBuilder {
|
||||
}
|
||||
|
||||
template <SplitDispatch::Dim d = dim, typename... ArgsT>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d1D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d1D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setArgSvm(SplitDispatch::RegionCoordX x, ArgsT &&...args) {
|
||||
dispatchInfos[getDispatchId(x)].getKernel()->setArgSvm(std::forward<ArgsT>(args)...);
|
||||
}
|
||||
|
||||
template <SplitDispatch::Dim d = dim, typename... ArgsT>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d2D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d2D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setArgSvm(SplitDispatch::RegionCoordX x, SplitDispatch::RegionCoordY y, ArgsT &&...args) {
|
||||
dispatchInfos[getDispatchId(x, y)].getKernel()->setArgSvm(std::forward<ArgsT>(args)...);
|
||||
}
|
||||
template <SplitDispatch::Dim d = dim, typename... ArgsT>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d3D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d3D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setArgSvm(SplitDispatch::RegionCoordX x, SplitDispatch::RegionCoordY y, SplitDispatch::RegionCoordZ z, ArgsT &&...args) {
|
||||
dispatchInfos[getDispatchId(x, y, z)].getKernel()->setArgSvm(std::forward<ArgsT>(args)...);
|
||||
}
|
||||
@@ -132,41 +132,41 @@ class DispatchInfoBuilder {
|
||||
}
|
||||
|
||||
template <SplitDispatch::Dim d = dim, typename... ArgsT>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d1D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d1D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setArg(SplitDispatch::RegionCoordX x, ArgsT &&...args) {
|
||||
dispatchInfos[getDispatchId(x)].getKernel()->setArg(std::forward<ArgsT>(args)...);
|
||||
}
|
||||
|
||||
template <SplitDispatch::Dim d = dim, typename... ArgsT>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d2D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d2D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setArg(SplitDispatch::RegionCoordX x, SplitDispatch::RegionCoordY y, ArgsT &&...args) {
|
||||
dispatchInfos[getDispatchId(x, y)].getKernel()->setArg(std::forward<ArgsT>(args)...);
|
||||
}
|
||||
template <SplitDispatch::Dim d = dim, typename... ArgsT>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d3D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d3D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setArg(SplitDispatch::RegionCoordX x, SplitDispatch::RegionCoordY y, SplitDispatch::RegionCoordZ z, ArgsT &&...args) {
|
||||
dispatchInfos[getDispatchId(x, y, z)].getKernel()->setArg(std::forward<ArgsT>(args)...);
|
||||
}
|
||||
template <SplitDispatch::Dim d = dim>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d1D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d1D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setKernel(SplitDispatch::RegionCoordX x, Kernel *kern) {
|
||||
dispatchInfos[getDispatchId(x)].setKernel(kern);
|
||||
}
|
||||
|
||||
template <SplitDispatch::Dim d = dim>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d2D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d2D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setKernel(SplitDispatch::RegionCoordX x, SplitDispatch::RegionCoordY y, Kernel *kern) {
|
||||
dispatchInfos[getDispatchId(x, y)].setKernel(kern);
|
||||
}
|
||||
|
||||
template <SplitDispatch::Dim d = dim>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d3D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d3D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setKernel(SplitDispatch::RegionCoordX x, SplitDispatch::RegionCoordY y, SplitDispatch::RegionCoordZ z, Kernel *kern) {
|
||||
dispatchInfos[getDispatchId(x, y, z)].setKernel(kern);
|
||||
}
|
||||
|
||||
template <SplitDispatch::SplitMode m = mode>
|
||||
typename std::enable_if<(m == SplitDispatch::SplitMode::NoSplit) || (m == SplitDispatch::SplitMode::WalkerSplit), void>::type
|
||||
typename std::enable_if<(m == SplitDispatch::SplitMode::noSplit) || (m == SplitDispatch::SplitMode::walkerSplit), void>::type
|
||||
setDispatchGeometry(const uint32_t inputDim, const Vec3<size_t> &gws, const Vec3<size_t> &elws, const Vec3<size_t> &offset, const Vec3<size_t> &agws = {0, 0, 0}, const Vec3<size_t> &lws = {0, 0, 0}, const Vec3<size_t> &twgs = {0, 0, 0}, const Vec3<size_t> &nwgs = {0, 0, 0}, const Vec3<size_t> &swgs = {0, 0, 0}) {
|
||||
auto &dispatchInfo = dispatchInfos[0];
|
||||
DEBUG_BREAK_IF(inputDim > static_cast<uint32_t>(dim) + 1);
|
||||
@@ -182,7 +182,7 @@ class DispatchInfoBuilder {
|
||||
}
|
||||
|
||||
template <SplitDispatch::SplitMode m = mode>
|
||||
typename std::enable_if<(m == SplitDispatch::SplitMode::NoSplit) || (m == SplitDispatch::SplitMode::WalkerSplit), void>::type
|
||||
typename std::enable_if<(m == SplitDispatch::SplitMode::noSplit) || (m == SplitDispatch::SplitMode::walkerSplit), void>::type
|
||||
setDispatchGeometry(const Vec3<size_t> &gws, const Vec3<size_t> &elws, const Vec3<size_t> &offset, const Vec3<size_t> &agws = {0, 0, 0}, const Vec3<size_t> &lws = {0, 0, 0}, const Vec3<size_t> &twgs = {0, 0, 0}, const Vec3<size_t> &nwgs = {0, 0, 0}, const Vec3<size_t> &swgs = {0, 0, 0}) {
|
||||
auto &dispatchInfo = dispatchInfos[0];
|
||||
dispatchInfo.setDim(static_cast<uint32_t>(dim) + 1);
|
||||
@@ -197,7 +197,7 @@ class DispatchInfoBuilder {
|
||||
}
|
||||
|
||||
template <SplitDispatch::Dim d = dim, typename... ArgsT>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d1D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d1D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setDispatchGeometry(SplitDispatch::RegionCoordX x,
|
||||
const Vec3<size_t> &gws, const Vec3<size_t> &elws, const Vec3<size_t> &offset, const Vec3<size_t> &agws = {0, 0, 0}, const Vec3<size_t> &lws = {0, 0, 0}, const Vec3<size_t> &twgs = {0, 0, 0}, const Vec3<size_t> &nwgs = {0, 0, 0}, const Vec3<size_t> &swgs = {0, 0, 0}) {
|
||||
auto &dispatchInfo = dispatchInfos[getDispatchId(x)];
|
||||
@@ -213,7 +213,7 @@ class DispatchInfoBuilder {
|
||||
}
|
||||
|
||||
template <SplitDispatch::Dim d = dim, typename... ArgsT>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d2D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d2D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setDispatchGeometry(SplitDispatch::RegionCoordX x, SplitDispatch::RegionCoordY y,
|
||||
const Vec3<size_t> &gws, const Vec3<size_t> &elws, const Vec3<size_t> &offset, const Vec3<size_t> &agws = {0, 0, 0}, const Vec3<size_t> lws = {0, 0, 0}, const Vec3<size_t> &twgs = {0, 0, 0}, const Vec3<size_t> &nwgs = {0, 0, 0}, const Vec3<size_t> &swgs = {0, 0, 0}) {
|
||||
auto &dispatchInfo = dispatchInfos[getDispatchId(x, y)];
|
||||
@@ -229,7 +229,7 @@ class DispatchInfoBuilder {
|
||||
}
|
||||
|
||||
template <SplitDispatch::Dim d = dim, typename... ArgsT>
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d3D) && (mode != SplitDispatch::SplitMode::NoSplit), void>::type
|
||||
typename std::enable_if<(d == SplitDispatch::Dim::d3D) && (mode != SplitDispatch::SplitMode::noSplit), void>::type
|
||||
setDispatchGeometry(SplitDispatch::RegionCoordX x, SplitDispatch::RegionCoordY y, SplitDispatch::RegionCoordZ z,
|
||||
const Vec3<size_t> &gws, const Vec3<size_t> &elws, const Vec3<size_t> &offset, const Vec3<size_t> &agws = {0, 0, 0}, const Vec3<size_t> &lws = {0, 0, 0}, const Vec3<size_t> &twgs = {0, 0, 0}, const Vec3<size_t> &nwgs = {0, 0, 0}, const Vec3<size_t> &swgs = {0, 0, 0}) {
|
||||
auto &dispatchInfo = dispatchInfos[getDispatchId(x, y, z)];
|
||||
@@ -304,7 +304,7 @@ class DispatchInfoBuilder {
|
||||
|
||||
protected:
|
||||
static bool supportsSplit() {
|
||||
return (mode == SplitDispatch::SplitMode::WalkerSplit);
|
||||
return (mode == SplitDispatch::SplitMode::walkerSplit);
|
||||
}
|
||||
|
||||
static bool needsSplit(const DispatchInfo &dispatchInfo) {
|
||||
@@ -312,12 +312,12 @@ class DispatchInfoBuilder {
|
||||
}
|
||||
|
||||
static void pushSplit(const DispatchInfo &dispatchInfo, MultiDispatchInfo &outMdi) {
|
||||
constexpr auto xMain = SplitDispatch::RegionCoordX::Left;
|
||||
constexpr auto xRight = SplitDispatch::RegionCoordX::Middle;
|
||||
constexpr auto yMain = SplitDispatch::RegionCoordY::Top;
|
||||
constexpr auto yBottom = SplitDispatch::RegionCoordY::Middle;
|
||||
constexpr auto zMain = SplitDispatch::RegionCoordZ::Front;
|
||||
constexpr auto zBack = SplitDispatch::RegionCoordZ::Middle;
|
||||
constexpr auto xMain = SplitDispatch::RegionCoordX::left;
|
||||
constexpr auto xRight = SplitDispatch::RegionCoordX::middle;
|
||||
constexpr auto yMain = SplitDispatch::RegionCoordY::top;
|
||||
constexpr auto yBottom = SplitDispatch::RegionCoordY::middle;
|
||||
constexpr auto zMain = SplitDispatch::RegionCoordZ::front;
|
||||
constexpr auto zBack = SplitDispatch::RegionCoordZ::middle;
|
||||
|
||||
switch (dispatchInfo.getDim()) {
|
||||
default:
|
||||
@@ -335,7 +335,7 @@ class DispatchInfoBuilder {
|
||||
Vec3<size_t> mainSWGS = {0, 0, 0};
|
||||
Vec3<size_t> rightSWGS = {mainNWGS.x, 0, 0};
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::KernelSplit> builder1D(dispatchInfo.getClDevice());
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::kernelSplit> builder1D(dispatchInfo.getClDevice());
|
||||
|
||||
builder1D.setKernel(dispatchInfo.getKernel());
|
||||
|
||||
@@ -365,7 +365,7 @@ class DispatchInfoBuilder {
|
||||
Vec3<size_t> bottomSWGS = {0, mainNWGS.y, 0};
|
||||
Vec3<size_t> rightbottomSWGS = {mainNWGS.x, mainNWGS.y, 0};
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::KernelSplit> builder2D(dispatchInfo.getClDevice());
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::kernelSplit> builder2D(dispatchInfo.getClDevice());
|
||||
|
||||
builder2D.setKernel(dispatchInfo.getKernel());
|
||||
|
||||
@@ -413,7 +413,7 @@ class DispatchInfoBuilder {
|
||||
Vec3<size_t> bottombackSWGS = {0, mainNWGS.y, mainNWGS.z};
|
||||
Vec3<size_t> rightbottombackSWGS = {mainNWGS.x, mainNWGS.y, mainNWGS.z};
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::KernelSplit> builder3D(dispatchInfo.getClDevice());
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::kernelSplit> builder3D(dispatchInfo.getClDevice());
|
||||
|
||||
builder3D.setKernel(dispatchInfo.getKernel());
|
||||
|
||||
@@ -443,7 +443,7 @@ class DispatchInfoBuilder {
|
||||
return static_cast<uint32_t>(x);
|
||||
}
|
||||
|
||||
static const size_t numDispatches = (mode == SplitDispatch::SplitMode::WalkerSplit) ? 1 : powConst((static_cast<uint32_t>(mode) + 1), // 1 (middle) 2 (middle + right/bottom) or 3 (lef/top + middle + right/mottom)
|
||||
static const size_t numDispatches = (mode == SplitDispatch::SplitMode::walkerSplit) ? 1 : powConst((static_cast<uint32_t>(mode) + 1), // 1 (middle) 2 (middle + right/bottom) or 3 (lef/top + middle + right/mottom)
|
||||
(static_cast<uint32_t>(dim) + 1)); // 1, 2 or 3
|
||||
|
||||
DispatchInfo dispatchInfos[numDispatches];
|
||||
|
||||
@@ -208,7 +208,7 @@ bool inline copyHostPointer(Buffer *buffer,
|
||||
bool copyOnCpuAllowed = implicitScalingEnabled == false &&
|
||||
size <= Buffer::maxBufferSizeForCopyOnCpu &&
|
||||
isCompressionEnabled == false &&
|
||||
productHelper.getLocalMemoryAccessMode(hwInfo) != LocalMemoryAccessMode::CpuAccessDisallowed &&
|
||||
productHelper.getLocalMemoryAccessMode(hwInfo) != LocalMemoryAccessMode::cpuAccessDisallowed &&
|
||||
isLockable;
|
||||
if (debugManager.flags.CopyHostPtrOnCpu.get() != -1) {
|
||||
copyOnCpuAllowed = debugManager.flags.CopyHostPtrOnCpu.get() == 1;
|
||||
|
||||
@@ -208,17 +208,17 @@ struct MultitileMulticontextTests : public MulticontextAubFixture, public ::test
|
||||
};
|
||||
|
||||
// 4 Tiles
|
||||
using FourTilesAllContextsTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::All>;
|
||||
using FourTilesAllContextsTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::all>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, FourTilesAllContextsTest, GENERATEONLY_givenFourTilesAndAllContextsWhenSubmittingThenDataIsValid) {
|
||||
runAubTest<FamilyType>();
|
||||
}
|
||||
|
||||
using FourTilesDualContextTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::Dual>;
|
||||
using FourTilesDualContextTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::dual>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, FourTilesDualContextTest, HEAVY_givenFourTilesAndDualContextWhenSubmittingThenDataIsValid) {
|
||||
runAubTest<FamilyType>();
|
||||
}
|
||||
|
||||
using FourTilesSingleContextTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::Single>;
|
||||
using FourTilesSingleContextTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::single>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, FourTilesSingleContextTest, givenFourTilesAndSingleContextWhenSubmittingThenDataIsValid) {
|
||||
runAubTest<FamilyType>();
|
||||
}
|
||||
@@ -521,28 +521,28 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, StaticWalkerPartitionFourTilesTests, whenNoPreWalke
|
||||
}
|
||||
|
||||
// 2 Tiles
|
||||
using TwoTilesAllContextsTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::All>;
|
||||
using TwoTilesAllContextsTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::all>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, TwoTilesAllContextsTest, HEAVY_givenTwoTilesAndAllContextsWhenSubmittingThenDataIsValid) {
|
||||
runAubTest<FamilyType>();
|
||||
}
|
||||
|
||||
using TwoTilesDualContextTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::Dual>;
|
||||
using TwoTilesDualContextTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::dual>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, TwoTilesDualContextTest, givenTwoTilesAndDualContextWhenSubmittingThenDataIsValid) {
|
||||
runAubTest<FamilyType>();
|
||||
}
|
||||
|
||||
using TwoTilesSingleContextTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::Single>;
|
||||
using TwoTilesSingleContextTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::single>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, TwoTilesSingleContextTest, givenTwoTilesAndSingleContextWhenSubmittingThenDataIsValid) {
|
||||
runAubTest<FamilyType>();
|
||||
}
|
||||
|
||||
// 1 Tile
|
||||
using SingleTileAllContextsTest = MultitileMulticontextTests<1, MulticontextAubFixture::EnabledCommandStreamers::All>;
|
||||
using SingleTileAllContextsTest = MultitileMulticontextTests<1, MulticontextAubFixture::EnabledCommandStreamers::all>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, SingleTileAllContextsTest, GENERATEONLY_givenSingleTileAndAllContextsWhenSubmittingThenDataIsValid) {
|
||||
runAubTest<FamilyType>();
|
||||
}
|
||||
|
||||
using SingleTileDualContextTest = MultitileMulticontextTests<1, MulticontextAubFixture::EnabledCommandStreamers::Dual>;
|
||||
using SingleTileDualContextTest = MultitileMulticontextTests<1, MulticontextAubFixture::EnabledCommandStreamers::dual>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, SingleTileDualContextTest, givenSingleTileAndDualContextWhenSubmittingThenDataIsValid) {
|
||||
runAubTest<FamilyType>();
|
||||
}
|
||||
@@ -578,44 +578,44 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, SingleTileDualContextTest, givenSingleAllocationWhe
|
||||
}
|
||||
|
||||
// 1 Tile
|
||||
using SingleTileDualContextTest = MultitileMulticontextTests<1, MulticontextAubFixture::EnabledCommandStreamers::Dual>;
|
||||
using SingleTileDualContextTest = MultitileMulticontextTests<1, MulticontextAubFixture::EnabledCommandStreamers::dual>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, SingleTileDualContextTest, givenSingleTileAndDualContextWhenWritingImageThenDataIsValid) {
|
||||
runAubWriteImageTest<FamilyType>();
|
||||
}
|
||||
|
||||
using SingleTileAllContextsTest = MultitileMulticontextTests<1, MulticontextAubFixture::EnabledCommandStreamers::All>;
|
||||
using SingleTileAllContextsTest = MultitileMulticontextTests<1, MulticontextAubFixture::EnabledCommandStreamers::all>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, SingleTileAllContextsTest, HEAVY_givenSingleTileAndAllContextsWhenWritingImageThenDataIsValid) {
|
||||
runAubWriteImageTest<FamilyType>();
|
||||
}
|
||||
|
||||
// 2 Tiles
|
||||
using TwoTilesSingleContextTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::Single>;
|
||||
using TwoTilesSingleContextTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::single>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, TwoTilesSingleContextTest, givenTwoTilesAndSingleContextWhenWritingImageThenDataIsValid) {
|
||||
runAubWriteImageTest<FamilyType>();
|
||||
}
|
||||
|
||||
using TwoTilesDualContextTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::Dual>;
|
||||
using TwoTilesDualContextTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::dual>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, TwoTilesDualContextTest, givenTwoTilesAndDualContextWhenWritingImageThenDataIsValid) {
|
||||
runAubWriteImageTest<FamilyType>();
|
||||
}
|
||||
|
||||
using TwoTilesAllContextsTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::All>;
|
||||
using TwoTilesAllContextsTest = MultitileMulticontextTests<2, MulticontextAubFixture::EnabledCommandStreamers::all>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, TwoTilesAllContextsTest, GENERATEONLY_givenTwoTilesAndAllContextsWhenWritingImageThenDataIsValid) {
|
||||
runAubWriteImageTest<FamilyType>();
|
||||
}
|
||||
|
||||
// 4 Tiles
|
||||
using FourTilesSingleContextTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::Single>;
|
||||
using FourTilesSingleContextTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::single>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, FourTilesSingleContextTest, givenFourTilesAndSingleContextWhenWritingImageThenDataIsValid) {
|
||||
runAubWriteImageTest<FamilyType>();
|
||||
}
|
||||
|
||||
using FourTilesDualContextTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::Dual>;
|
||||
using FourTilesDualContextTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::dual>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, FourTilesDualContextTest, GENERATEONLY_givenFourTilesAndDualContextWhenWritingImageThenDataIsValid) {
|
||||
runAubWriteImageTest<FamilyType>();
|
||||
}
|
||||
|
||||
using FourTilesAllContextsTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::All>;
|
||||
using FourTilesAllContextsTest = MultitileMulticontextTests<4, MulticontextAubFixture::EnabledCommandStreamers::all>;
|
||||
HWCMDTEST_F(IGFX_XE_HP_CORE, FourTilesAllContextsTest, GENERATEONLY_givenFourTilesAndAllContextsWhenWritingImageThenDataIsValid) {
|
||||
runAubWriteImageTest<FamilyType>();
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ using namespace NEO;
|
||||
struct OneVAFourPhysicalStoragesTest : public MulticontextAubFixture, public ::testing::Test {
|
||||
static const uint32_t numTiles = 4;
|
||||
void SetUp() override {
|
||||
MulticontextAubFixture::setUp(numTiles, MulticontextAubFixture::EnabledCommandStreamers::Single, false);
|
||||
MulticontextAubFixture::setUp(numTiles, MulticontextAubFixture::EnabledCommandStreamers::single, false);
|
||||
}
|
||||
void TearDown() override {
|
||||
MulticontextAubFixture::tearDown();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -19,7 +19,7 @@ struct MultiTileBuffersXeHPAndLater : public MulticontextAubFixture, public ::te
|
||||
static constexpr uint32_t numTiles = 2;
|
||||
|
||||
void SetUp() override {
|
||||
MulticontextAubFixture::setUp(numTiles, EnabledCommandStreamers::Single, false);
|
||||
MulticontextAubFixture::setUp(numTiles, EnabledCommandStreamers::single, false);
|
||||
}
|
||||
void TearDown() override {
|
||||
MulticontextAubFixture::tearDown();
|
||||
|
||||
@@ -53,7 +53,7 @@ struct CopyEngineXeHPAndLater : public MulticontextAubFixture, public ::testing:
|
||||
debugManager.flags.RenderCompressedImagesEnabled.set(true);
|
||||
debugManager.flags.EnableFreeMemory.set(false);
|
||||
|
||||
MulticontextAubFixture::setUp(numTiles, EnabledCommandStreamers::Single, true);
|
||||
MulticontextAubFixture::setUp(numTiles, EnabledCommandStreamers::single, true);
|
||||
|
||||
defaultCommandQueue = commandQueues[0][0].get();
|
||||
bcsCsr = tileDevices[0]->getNearestGenericSubDevice(0)->getEngine(bcsEngineType, EngineUsage::regular).commandStreamReceiver;
|
||||
|
||||
@@ -39,7 +39,7 @@ void MulticontextAubFixture::setUp(uint32_t numberOfTiles, EnabledCommandStreame
|
||||
}
|
||||
|
||||
HardwareInfo localHwInfo = *defaultHwInfo;
|
||||
if (EnabledCommandStreamers::All == enabledCommandStreamers) {
|
||||
if (EnabledCommandStreamers::all == enabledCommandStreamers) {
|
||||
overridePlatformConfigForAllEnginesSupport(localHwInfo);
|
||||
}
|
||||
|
||||
@@ -73,11 +73,11 @@ void MulticontextAubFixture::setUp(uint32_t numberOfTiles, EnabledCommandStreame
|
||||
std::stringstream strfilename;
|
||||
strfilename << ApiSpecificConfig::getAubPrefixForSpecificApi();
|
||||
strfilename << testInfo->test_case_name() << "_" << testInfo->name() << "_";
|
||||
if (EnabledCommandStreamers::Single == enabledCommandStreamers) {
|
||||
if (EnabledCommandStreamers::single == enabledCommandStreamers) {
|
||||
strfilename << renderEngineName;
|
||||
} else if (EnabledCommandStreamers::Dual == enabledCommandStreamers) {
|
||||
} else if (EnabledCommandStreamers::dual == enabledCommandStreamers) {
|
||||
strfilename << renderEngineName << "_CCS0";
|
||||
} else if (EnabledCommandStreamers::All == enabledCommandStreamers) {
|
||||
} else if (EnabledCommandStreamers::all == enabledCommandStreamers) {
|
||||
strfilename << renderEngineName << "_CCS0_3"; // xehp_config_name_RCS_CCS0_3.aub
|
||||
}
|
||||
|
||||
@@ -123,7 +123,7 @@ void MulticontextAubFixture::setUp(uint32_t numberOfTiles, EnabledCommandStreame
|
||||
for (uint32_t tile = 0; tile < numberOfTiles; tile++) {
|
||||
tileDevices.push_back(rootDevice->getNearestGenericSubDevice(tile));
|
||||
EXPECT_NE(nullptr, tileDevices[tile]);
|
||||
if (EnabledCommandStreamers::Single == enabledCommandStreamers) {
|
||||
if (EnabledCommandStreamers::single == enabledCommandStreamers) {
|
||||
if (EngineHelpers::isCcs(engineType)) {
|
||||
auto familyQueue = tileDevices[tile]->getDevice().getEngineGroupIndexFromEngineGroupType(EngineGroupType::compute);
|
||||
commandQueues[tile].push_back(createCommandQueueForEngine(tile, familyQueue, 0));
|
||||
@@ -131,12 +131,12 @@ void MulticontextAubFixture::setUp(uint32_t numberOfTiles, EnabledCommandStreame
|
||||
auto familyQueue = tileDevices[tile]->getDevice().getEngineGroupIndexFromEngineGroupType(EngineGroupType::renderCompute);
|
||||
commandQueues[tile].push_back(createCommandQueueForEngine(tile, familyQueue, 0));
|
||||
}
|
||||
} else if (EnabledCommandStreamers::Dual == enabledCommandStreamers) {
|
||||
} else if (EnabledCommandStreamers::dual == enabledCommandStreamers) {
|
||||
auto rcsQueue = tileDevices[tile]->getDevice().getEngineGroupIndexFromEngineGroupType(EngineGroupType::renderCompute);
|
||||
auto ccsQueue = tileDevices[tile]->getDevice().getEngineGroupIndexFromEngineGroupType(EngineGroupType::compute);
|
||||
commandQueues[tile].push_back(createCommandQueueForEngine(tile, rcsQueue, 0));
|
||||
commandQueues[tile].push_back(createCommandQueueForEngine(tile, ccsQueue, 0));
|
||||
} else if (EnabledCommandStreamers::All == enabledCommandStreamers) {
|
||||
} else if (EnabledCommandStreamers::all == enabledCommandStreamers) {
|
||||
auto rcsQueue = tileDevices[tile]->getDevice().getEngineGroupIndexFromEngineGroupType(EngineGroupType::renderCompute);
|
||||
auto ccsQueue = tileDevices[tile]->getDevice().getEngineGroupIndexFromEngineGroupType(EngineGroupType::compute);
|
||||
commandQueues[tile].push_back(createCommandQueueForEngine(tile, rcsQueue, 0));
|
||||
|
||||
@@ -24,9 +24,9 @@ class MockDevice;
|
||||
|
||||
struct MulticontextAubFixture {
|
||||
enum class EnabledCommandStreamers {
|
||||
Single, // default only
|
||||
Dual, // RCS + CCS0
|
||||
All, // RCS + CCS0-3
|
||||
single, // default only
|
||||
dual, // RCS + CCS0
|
||||
all, // RCS + CCS0-3
|
||||
};
|
||||
|
||||
void setUp(uint32_t numberOfTiles, EnabledCommandStreamers enabledCommandStreamers, bool enableCompression);
|
||||
|
||||
@@ -122,7 +122,7 @@ class SystemMemFenceWithBlitter : public MulticontextAubFixture,
|
||||
debugManager.flags.EnableBlitterOperationsSupport.set(1);
|
||||
debugManager.flags.EnableBlitterForEnqueueOperations.set(1);
|
||||
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::Single, true);
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::single, true);
|
||||
}
|
||||
void TearDown() override {
|
||||
MulticontextAubFixture::tearDown();
|
||||
@@ -171,7 +171,7 @@ class SystemMemFenceViaKernel : public ProgramFixture,
|
||||
debugManager.flags.ProgramGlobalFenceAsKernelInstructionInEUKernel.set(1);
|
||||
|
||||
ProgramFixture::setUp();
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::Single, true);
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::single, true);
|
||||
}
|
||||
void TearDown() override {
|
||||
MulticontextAubFixture::tearDown();
|
||||
|
||||
@@ -83,7 +83,7 @@ class UmStatelessCompressionWithBlitter : public MulticontextAubFixture,
|
||||
debugManager.flags.EnableBlitterForEnqueueOperations.set(1);
|
||||
compareCompressedMemory = GetParam();
|
||||
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::Single, true);
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::single, true);
|
||||
}
|
||||
void TearDown() override {
|
||||
MulticontextAubFixture::tearDown();
|
||||
@@ -144,7 +144,7 @@ class UmStatelessCompressionWithStatefulAccess : public ProgramFixture,
|
||||
compareCompressedMemory = GetParam();
|
||||
|
||||
ProgramFixture::setUp();
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::Single, true);
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::single, true);
|
||||
}
|
||||
void TearDown() override {
|
||||
MulticontextAubFixture::tearDown();
|
||||
|
||||
@@ -487,7 +487,7 @@ struct XeHpgCoreStatelessCompressionInSBAWithBCS : public MulticontextAubFixture
|
||||
debugManager.flags.EnableStatelessCompression.set(1);
|
||||
debugManager.flags.ForceAuxTranslationMode.set(static_cast<int32_t>(AuxTranslationMode::blit));
|
||||
debugManager.flags.EnableBlitterOperationsSupport.set(true);
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::Single, true);
|
||||
MulticontextAubFixture::setUp(1, EnabledCommandStreamers::single, true);
|
||||
StatelessCopyKernelFixture::setUp(tileDevices[0], context.get());
|
||||
if (!tileDevices[0]->getHardwareInfo().featureTable.flags.ftrLocalMemory) {
|
||||
GTEST_SKIP();
|
||||
|
||||
@@ -495,7 +495,7 @@ HWTEST_TEMPLATED_F(BlitEnqueueForceFlagsTests, givenFlagToForceCsrLockAndBlocked
|
||||
using BlitCopyTests = BlitEnqueueTests<1>;
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitCopyTests, givenKernelAllocationInLocalMemoryWhenCreatingWithoutAllowedCpuAccessThenUseBcsForTransfer) {
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
debugManager.flags.ForceNonSystemMemoryPlacement.set(1 << (static_cast<int64_t>(AllocationType::kernelIsa) - 1));
|
||||
|
||||
uint32_t kernelHeap = 0;
|
||||
@@ -517,7 +517,7 @@ HWTEST_TEMPLATED_F(BlitCopyTests, givenKernelAllocationInLocalMemoryWhenCreating
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitCopyTests, givenKernelAllocationInLocalMemoryWhenCreatingWithAllowedCpuAccessThenDontUseBcsForTransfer) {
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessAllowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessAllowed));
|
||||
debugManager.flags.ForceNonSystemMemoryPlacement.set(1 << (static_cast<int64_t>(AllocationType::kernelIsa) - 1));
|
||||
|
||||
uint32_t kernelHeap = 0;
|
||||
@@ -535,7 +535,7 @@ HWTEST_TEMPLATED_F(BlitCopyTests, givenKernelAllocationInLocalMemoryWhenCreating
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitCopyTests, givenKernelAllocationInLocalMemoryWhenCreatingWithDisallowedCpuAccessAndDisabledBlitterThenFallbackToCpuCopy) {
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
debugManager.flags.ForceNonSystemMemoryPlacement.set(1 << (static_cast<int64_t>(AllocationType::kernelIsa) - 1));
|
||||
|
||||
device->getExecutionEnvironment()->rootDeviceEnvironments[0]->getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = false;
|
||||
@@ -556,7 +556,7 @@ HWTEST_TEMPLATED_F(BlitCopyTests, givenKernelAllocationInLocalMemoryWhenCreating
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitCopyTests, givenLocalMemoryAccessNotAllowedWhenGlobalConstantsAreExportedThenUseBlitter) {
|
||||
debugManager.flags.EnableLocalMemory.set(1);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
|
||||
char constantData[128] = {};
|
||||
ProgramInfo programInfo;
|
||||
@@ -582,7 +582,7 @@ HWTEST_TEMPLATED_F(BlitCopyTests, givenLocalMemoryAccessNotAllowedWhenGlobalCons
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitCopyTests, givenKernelAllocationInLocalMemoryWithoutCpuAccessAllowedWhenSubstituteKernelHeapIsCalledThenUseBcsForTransfer) {
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
debugManager.flags.ForceNonSystemMemoryPlacement.set(1 << (static_cast<int64_t>(AllocationType::kernelIsa) - 1));
|
||||
|
||||
device->getExecutionEnvironment()->rootDeviceEnvironments[0]->getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true;
|
||||
@@ -608,7 +608,7 @@ HWTEST_TEMPLATED_F(BlitCopyTests, givenKernelAllocationInLocalMemoryWithoutCpuAc
|
||||
}
|
||||
|
||||
HWTEST_TEMPLATED_F(BlitCopyTests, givenKernelAllocationInLocalMemoryWithoutCpuAccessAllowedWhenLinkerRequiresPatchingOfInstructionSegmentsThenUseBcsForTransfer) {
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
debugManager.flags.ForceNonSystemMemoryPlacement.set(1 << (static_cast<int64_t>(AllocationType::kernelIsa) - 1));
|
||||
|
||||
device->getExecutionEnvironment()->rootDeviceEnvironments[0]->getMutableHardwareInfo()->capabilityTable.blitterOperationsSupported = true;
|
||||
|
||||
@@ -49,7 +49,7 @@ struct MockBuilder : BuiltinDispatchInfoBuilder {
|
||||
paramsReceived.offset = offset;
|
||||
wasBuildDispatchInfosWithKernelParamsCalled = true;
|
||||
|
||||
DispatchInfoBuilder<NEO::SplitDispatch::Dim::d3D, NEO::SplitDispatch::SplitMode::NoSplit> dispatchInfoBuilder(clDevice);
|
||||
DispatchInfoBuilder<NEO::SplitDispatch::Dim::d3D, NEO::SplitDispatch::SplitMode::noSplit> dispatchInfoBuilder(clDevice);
|
||||
dispatchInfoBuilder.setKernel(paramsToUse.kernel);
|
||||
dispatchInfoBuilder.setDispatchGeometry(dim, paramsToUse.gws, paramsToUse.elws, paramsToUse.offset);
|
||||
dispatchInfoBuilder.bake(d);
|
||||
|
||||
@@ -643,7 +643,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenAutoLocal
|
||||
size_t globalOffsets[] = {0, 0, 0};
|
||||
|
||||
MultiDispatchInfo multiDispatchInfo(kernel->mockKernel);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::NoSplit> builder(*device);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::noSplit> builder(*device);
|
||||
builder.setDispatchGeometry(1, gws, lws, globalOffsets);
|
||||
builder.setKernel(kernel->mockKernel);
|
||||
builder.bake(multiDispatchInfo);
|
||||
@@ -705,7 +705,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
|
||||
size_t globalOffsets[] = {0, 0, 0};
|
||||
|
||||
MultiDispatchInfo multiDispatchInfo(kernel->mockKernel);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::NoSplit> builder(*device);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::noSplit> builder(*device);
|
||||
builder.setDispatchGeometry(1, gws, lws, globalOffsets);
|
||||
builder.setKernel(kernel->mockKernel);
|
||||
builder.bake(multiDispatchInfo);
|
||||
@@ -807,7 +807,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, XeHPAndLaterDispatchWalkerBasicTest, givenPassInlin
|
||||
size_t globalOffsets[] = {0, 0, 0};
|
||||
|
||||
MultiDispatchInfo multiDispatchInfo(kernel->mockKernel);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::NoSplit> builder(*device);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::noSplit> builder(*device);
|
||||
builder.setDispatchGeometry(1, gws, lws, globalOffsets);
|
||||
builder.setKernel(kernel->mockKernel);
|
||||
builder.bake(multiDispatchInfo);
|
||||
|
||||
@@ -135,7 +135,7 @@ HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueHandlerWithAubSubCapt
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
AubSubCaptureCommon subCaptureCommon;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = "invalid_kernel_name";
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("file_name.aub", subCaptureCommon);
|
||||
aubCsr->subCaptureManager.reset(subCaptureManagerMock);
|
||||
@@ -156,7 +156,7 @@ HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueMarkerWithAubSubCaptu
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
AubSubCaptureCommon subCaptureCommon;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = "invalid_kernel_name";
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("file_name.aub", subCaptureCommon);
|
||||
aubCsr->subCaptureManager.reset(subCaptureManagerMock);
|
||||
@@ -176,7 +176,7 @@ HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenEnqueueHandlerWithAubSubCapt
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
AubSubCaptureCommon subCaptureCommon;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = "";
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelStartIdx = 0;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelEndIdx = 1;
|
||||
@@ -219,7 +219,7 @@ HWTEST_F(EnqueueHandlerWithAubSubCaptureTests, givenInputEventsWhenDispatchingEn
|
||||
pDevice->resetCommandStreamReceiver(aubCsr);
|
||||
|
||||
AubSubCaptureCommon subCaptureCommon;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = "";
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelStartIdx = 0;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelEndIdx = 1;
|
||||
@@ -550,7 +550,7 @@ HWTEST_F(EnqueueHandlerTest, givenExternallySynchronizedParentEventWhenRequestin
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenSubCaptureIsOffThenActivateSubCaptureIsNotCalled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Off));
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::off));
|
||||
|
||||
MockKernelWithInternals kernelInternals(*pClDevice, context);
|
||||
Kernel *kernel = kernelInternals.mockKernel;
|
||||
@@ -573,7 +573,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenSubCaptureIsOffThenActivateS
|
||||
|
||||
HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenSubCaptureIsOnThenActivateSubCaptureIsCalled) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Filter));
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::filter));
|
||||
|
||||
MockKernelWithInternals kernelInternals(*pClDevice, context);
|
||||
Kernel *kernel = kernelInternals.mockKernel;
|
||||
@@ -601,7 +601,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenClSetKernelExecInfoAlreadySe
|
||||
GTEST_SKIP();
|
||||
}
|
||||
DebugManagerStateRestore stateRestore;
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Filter));
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::filter));
|
||||
debugManager.flags.ForceThreadArbitrationPolicyProgrammingWithScm.set(1);
|
||||
pDevice->getUltCommandStreamReceiver<FamilyType>().streamProperties.initSupport(pClDevice->getRootDeviceEnvironment());
|
||||
|
||||
@@ -639,7 +639,7 @@ HWTEST_F(EnqueueHandlerTest, givenEnqueueHandlerWhenNotSupportedPolicyChangeThen
|
||||
GTEST_SKIP();
|
||||
}
|
||||
DebugManagerStateRestore stateRestore;
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Filter));
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::filter));
|
||||
|
||||
MockKernelWithInternals kernelInternals(*pClDevice, context);
|
||||
Kernel *kernel = kernelInternals.mockKernel;
|
||||
|
||||
@@ -104,7 +104,7 @@ TEST_F(EnqueueReadBuffer, WhenReadingBufferThenEventReturnedShouldBeMaxOfInputEv
|
||||
TEST_F(EnqueueReadBuffer, givenInOrderQueueAndForcedCpuCopyOnReadBufferAndDstPtrEqualSrcPtrWithEventsNotBlockedWhenReadBufferIsExecutedThenTaskLevelShouldNotBeIncreased) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.DoCpuCopyOnReadBuffer.set(1);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
uint32_t taskLevelCmdQ = 17;
|
||||
pCmdQ->taskLevel = taskLevelCmdQ;
|
||||
@@ -147,7 +147,7 @@ TEST_F(EnqueueReadBuffer, givenInOrderQueueAndForcedCpuCopyOnReadBufferAndDstPtr
|
||||
TEST_F(EnqueueReadBuffer, givenInOrderQueueAndForcedCpuCopyOnReadBufferAndDstPtrEqualSrcPtrWhenReadBufferIsExecutedThenTaskLevelShouldNotBeIncreased) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.DoCpuCopyOnReadBuffer.set(1);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
uint32_t taskLevelCmdQ = 17;
|
||||
pCmdQ->taskLevel = taskLevelCmdQ;
|
||||
@@ -181,7 +181,7 @@ TEST_F(EnqueueReadBuffer, givenInOrderQueueAndForcedCpuCopyOnReadBufferAndDstPtr
|
||||
TEST_F(EnqueueReadBuffer, givenOutOfOrderQueueAndForcedCpuCopyOnReadBufferAndDstPtrEqualSrcPtrWithEventsNotBlockedWhenReadBufferIsExecutedThenTaskLevelShouldNotBeIncreased) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.DoCpuCopyOnReadBuffer.set(1);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
std::unique_ptr<CommandQueue> pCmdOOQ(createCommandQueue(pClDevice, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE));
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
uint32_t taskLevelCmdQ = 17;
|
||||
|
||||
@@ -602,7 +602,7 @@ HWTEST_F(EnqueueReadBufferTypeTest, givenForcedCpuCopyWhenEnqueueReadCompressedB
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.DoCpuCopyOnReadBuffer.set(1);
|
||||
debugManager.flags.EnableCpuCacheForResources.set(true);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
MockMemoryManager memoryManager(false, true, executionEnvironment);
|
||||
|
||||
@@ -224,7 +224,7 @@ HWTEST_F(EnqueueUnmapMemObjTest, givenEnqueueUnmapMemObjectWhenNonAubWritableBuf
|
||||
HWTEST_F(EnqueueUnmapMemObjTest, givenWriteBufferIsServicedOnCPUWhenBufferIsNonAubTbxWriteableThenFlagsChange) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.DoCpuCopyOnWriteBuffer.set(1);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
auto buffer = std::unique_ptr<Buffer>(BufferHelper<>::create());
|
||||
ASSERT_NE(nullptr, buffer);
|
||||
auto graphicsAllocation = buffer->getGraphicsAllocation(pClDevice->getRootDeviceIndex());
|
||||
|
||||
@@ -104,7 +104,7 @@ TEST_F(EnqueueWriteBufferTypeTest, WhenWritingBufferThenReturnedEventShouldBeMax
|
||||
TEST_F(EnqueueWriteBufferTypeTest, givenInOrderQueueAndForcedCpuCopyOnWriteBufferAndDstPtrEqualSrcPtrWithEventsNotBlockedWhenWriteBufferIsExecutedThenTaskLevelShouldNotBeIncreased) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.DoCpuCopyOnWriteBuffer.set(1);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
uint32_t taskLevelCmdQ = 17;
|
||||
pCmdQ->taskLevel = taskLevelCmdQ;
|
||||
@@ -219,7 +219,7 @@ TEST_F(EnqueueWriteBufferTypeTest, givenInOrderQueueAndForcedCpuCopyOnWriteBuffe
|
||||
TEST_F(EnqueueWriteBufferTypeTest, givenOutOfOrderQueueAndForcedCpuCopyOnWriteBufferAndDstPtrEqualSrcPtrWithEventsWhenWriteBufferIsExecutedThenTaskLevelShouldNotBeIncreased) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.DoCpuCopyOnWriteBuffer.set(1);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
std::unique_ptr<CommandQueue> pCmdOOQ(createCommandQueue(pClDevice, CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE));
|
||||
cl_int retVal = CL_SUCCESS;
|
||||
uint32_t taskLevelCmdQ = 17;
|
||||
|
||||
@@ -431,7 +431,7 @@ HWTEST_F(EnqueueWriteBufferTypeTest, givenForcedCpuCopyWhenEnqueueWriteCompresse
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.DoCpuCopyOnWriteBuffer.set(1);
|
||||
debugManager.flags.EnableCpuCacheForResources.set(true);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
MockMemoryManager memoryManager(false, true, executionEnvironment);
|
||||
|
||||
@@ -22,7 +22,7 @@ typedef EnqueueReadBufferTypeTest ReadWriteBufferCpuCopyTest;
|
||||
HWTEST_F(ReadWriteBufferCpuCopyTest, givenCompressedGmmWhenAskingForCpuOperationThenDisallow) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.EnableCpuCacheForResources.set(true);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
cl_int retVal;
|
||||
auto rootDeviceIndex = context->getDevice(0)->getRootDeviceIndex();
|
||||
std::unique_ptr<Buffer> buffer(Buffer::create(context, CL_MEM_READ_WRITE, 1, nullptr, retVal));
|
||||
@@ -49,7 +49,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, givenCompressedGmmWhenAskingForCpuOperation
|
||||
|
||||
HWTEST_F(ReadWriteBufferCpuCopyTest, GivenUnalignedReadPtrWhenReadingBufferThenMemoryIsReadCorrectly) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
cl_int retVal;
|
||||
size_t offset = 1;
|
||||
size_t size = 4;
|
||||
@@ -90,7 +90,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, GivenUnalignedReadPtrWhenReadingBufferThenM
|
||||
|
||||
HWTEST_F(ReadWriteBufferCpuCopyTest, GivenUnalignedSrcPtrWhenWritingBufferThenMemoryIsWrittenCorrectly) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
cl_int retVal;
|
||||
size_t offset = 1;
|
||||
size_t size = 4;
|
||||
@@ -138,7 +138,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, GivenUnalignedSrcPtrWhenWritingBufferThenMe
|
||||
|
||||
HWTEST_F(ReadWriteBufferCpuCopyTest, GivenSpecificMemoryStructuresWhenReadingWritingMemoryThenCpuReadWriteIsAllowed) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
cl_int retVal;
|
||||
size_t size = MemoryConstants::cacheLineSize;
|
||||
auto alignedBufferPtr = alignedMalloc(MemoryConstants::cacheLineSize + 1, MemoryConstants::cacheLineSize);
|
||||
@@ -232,7 +232,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, GivenSpecificMemoryStructuresWhenReadingWri
|
||||
HWTEST_F(ReadWriteBufferCpuCopyTest, givenDebugVariableToDisableCpuCopiesWhenBufferCpuCopyAllowedIsCalledThenItReturnsFalse) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.EnableLocalMemory.set(false);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
|
||||
cl_int retVal;
|
||||
|
||||
@@ -258,7 +258,7 @@ HWTEST_F(ReadWriteBufferCpuCopyTest, givenDebugVariableToDisableCpuCopiesWhenBuf
|
||||
|
||||
TEST(ReadWriteBufferOnCpu, givenNoHostPtrAndAlignedSizeWhenMemoryAllocationIsInNonSystemMemoryPoolThenIsReadWriteOnCpuAllowedReturnsFalse) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
MockExecutionEnvironment *executionEnvironment = new MockExecutionEnvironment(nullptr, false, 1u);
|
||||
MockMemoryManager *memoryManager = new MockMemoryManager(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
@@ -282,7 +282,7 @@ TEST(ReadWriteBufferOnCpu, givenNoHostPtrAndAlignedSizeWhenMemoryAllocationIsInN
|
||||
|
||||
TEST(ReadWriteBufferOnCpu, givenPointerThatRequiresCpuCopyWhenCpuCopyIsEvaluatedThenTrueIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
MockExecutionEnvironment *executionEnvironment = new MockExecutionEnvironment(nullptr, false, 1u);
|
||||
MockMemoryManager *memoryManager = new MockMemoryManager(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
@@ -305,7 +305,7 @@ TEST(ReadWriteBufferOnCpu, givenPointerThatRequiresCpuCopyWhenCpuCopyIsEvaluated
|
||||
|
||||
TEST(ReadWriteBufferOnCpu, givenPointerThatRequiresCpuCopyButItIsNotPossibleWhenCpuCopyIsEvaluatedThenFalseIsReturned) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
MockExecutionEnvironment *executionEnvironment = new MockExecutionEnvironment(nullptr, false, 1u);
|
||||
MockMemoryManager *memoryManager = new MockMemoryManager(*executionEnvironment);
|
||||
executionEnvironment->memoryManager.reset(memoryManager);
|
||||
@@ -329,7 +329,7 @@ TEST(ReadWriteBufferOnCpu, givenPointerThatRequiresCpuCopyButItIsNotPossibleWhen
|
||||
|
||||
TEST(ReadWriteBufferOnCpu, whenLocalMemoryPoolAllocationIsAskedForPreferenceThenCpuIsNotChoosen) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(nullptr));
|
||||
MockContext ctx(device.get());
|
||||
|
||||
|
||||
@@ -547,7 +547,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ContextCreateTests, givenLocalMemoryAllocationWhenB
|
||||
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.EnableLocalMemory.set(true);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
|
||||
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
|
||||
defaultHwInfo->capabilityTable.blitterOperationsSupported = true;
|
||||
@@ -579,7 +579,7 @@ HWCMDTEST_F(IGFX_XE_HP_CORE, ContextCreateTests, givenGpuHangOnFlushBcsTaskAndLo
|
||||
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.EnableLocalMemory.set(true);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
|
||||
VariableBackup<HardwareInfo> backupHwInfo(defaultHwInfo.get());
|
||||
defaultHwInfo->capabilityTable.blitterOperationsSupported = true;
|
||||
|
||||
@@ -394,7 +394,7 @@ GEN12LPTEST_F(GfxCoreHelperTestGen12Lp, givenL1ForceDisabledWhenRequestingMocsTh
|
||||
|
||||
GEN12LPTEST_F(GfxCoreHelperTestGen12Lp, givenAllocationTypeWithCpuAccessRequiredWhenCpuAccessIsDisallowedThenSystemMemoryIsRequested) {
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
|
||||
const AllocationType allocationTypesToUseSystemMemory[] = {
|
||||
AllocationType::commandBuffer,
|
||||
|
||||
@@ -84,7 +84,7 @@ class DispatchInfoBuilderMock : DispatchInfoBuilder<dim, mode> {
|
||||
TEST_F(DispatchInfoBuilderTest, Given1dWhenSplittingMultiDispatchInfoThenMultiDispatchInfo) {
|
||||
MultiDispatchInfo multiDispatchInfo;
|
||||
|
||||
auto diBuilder = new DispatchInfoBuilderMock<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
auto diBuilder = new DispatchInfoBuilderMock<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
DispatchInfo dispatchInfo;
|
||||
@@ -97,13 +97,13 @@ TEST_F(DispatchInfoBuilderTest, Given1dWhenSplittingMultiDispatchInfoThenMultiDi
|
||||
TEST_F(DispatchInfoBuilderTest, WhenGettingDimensionThenCorrectDimensionIsReturned) {
|
||||
MultiDispatchInfo mdi1D, mdi2D, mdi3D;
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::NoSplit> *diBuilder1D = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::noSplit> *diBuilder1D = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder1D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::NoSplit> *diBuilder2D = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::noSplit> *diBuilder2D = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder2D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> *diBuilder3D = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> *diBuilder3D = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder3D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
diBuilder1D->setDispatchGeometry(Vec3<size_t>(1, 0, 0), Vec3<size_t>(0, 0, 0), Vec3<size_t>(0, 0, 0));
|
||||
@@ -130,7 +130,7 @@ TEST_F(DispatchInfoBuilderTest, WhenGettingDimensionThenCorrectDimensionIsReturn
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, WhenGettingGwsThenCorrectValuesAreReturned) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
MultiDispatchInfo mdi0, mdi1, mdi2, mdi3;
|
||||
@@ -176,7 +176,7 @@ TEST_F(DispatchInfoBuilderTest, WhenGettingGwsThenCorrectValuesAreReturned) {
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, WhenGettingElwsThenCorrectValuesAreReturned) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
MultiDispatchInfo mdi0, mdi1, mdi2, mdi3;
|
||||
@@ -222,7 +222,7 @@ TEST_F(DispatchInfoBuilderTest, WhenGettingElwsThenCorrectValuesAreReturned) {
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, WhenGettingLwsThenCorrectValuesAreReturned) {
|
||||
auto diBuilder = std::make_unique<DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>>(*pClDevice);
|
||||
auto diBuilder = std::make_unique<DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder);
|
||||
|
||||
MultiDispatchInfo mdi0, mdi1, mdi2, mdi3;
|
||||
@@ -261,7 +261,7 @@ TEST_F(DispatchInfoBuilderTest, WhenGettingLwsThenCorrectValuesAreReturned) {
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, GivenNoSplitWhenCheckingIfBuiltinThenReturnTrue) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
diBuilder->setKernel(pKernel);
|
||||
@@ -278,18 +278,18 @@ TEST_F(DispatchInfoBuilderTest, GivenNoSplitWhenCheckingIfBuiltinThenReturnTrue)
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, GivenSplitWhenCheckingIfBuiltinThenReturnTrue) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::KernelSplit> *diBuilder1D = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::KernelSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::kernelSplit> *diBuilder1D = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::kernelSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder1D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::KernelSplit> *diBuilder2D = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::KernelSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::kernelSplit> *diBuilder2D = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::kernelSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder2D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::KernelSplit> *diBuilder3D = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::KernelSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::kernelSplit> *diBuilder3D = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::kernelSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder3D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
// 1D
|
||||
diBuilder1D->setKernel(RegionCoordX::Left, pKernel);
|
||||
diBuilder1D->setDispatchGeometry(RegionCoordX::Left, Vec3<size_t>(256, 0, 0), Vec3<size_t>(16, 0, 0), Vec3<size_t>(0, 0, 0));
|
||||
diBuilder1D->setKernel(RegionCoordX::left, pKernel);
|
||||
diBuilder1D->setDispatchGeometry(RegionCoordX::left, Vec3<size_t>(256, 0, 0), Vec3<size_t>(16, 0, 0), Vec3<size_t>(0, 0, 0));
|
||||
MultiDispatchInfo mdi1D;
|
||||
diBuilder1D->bake(mdi1D);
|
||||
|
||||
@@ -299,8 +299,8 @@ TEST_F(DispatchInfoBuilderTest, GivenSplitWhenCheckingIfBuiltinThenReturnTrue) {
|
||||
}
|
||||
|
||||
// 2D
|
||||
diBuilder2D->setKernel(RegionCoordX::Left, RegionCoordY::Bottom, pKernel);
|
||||
diBuilder2D->setDispatchGeometry(RegionCoordX::Left, RegionCoordY::Bottom, Vec3<size_t>(256, 256, 0), Vec3<size_t>(16, 16, 0), Vec3<size_t>(0, 0, 0));
|
||||
diBuilder2D->setKernel(RegionCoordX::left, RegionCoordY::bottom, pKernel);
|
||||
diBuilder2D->setDispatchGeometry(RegionCoordX::left, RegionCoordY::bottom, Vec3<size_t>(256, 256, 0), Vec3<size_t>(16, 16, 0), Vec3<size_t>(0, 0, 0));
|
||||
MultiDispatchInfo mdi2D;
|
||||
diBuilder2D->bake(mdi2D);
|
||||
for (auto &dispatchInfo : mdi2D) {
|
||||
@@ -309,8 +309,8 @@ TEST_F(DispatchInfoBuilderTest, GivenSplitWhenCheckingIfBuiltinThenReturnTrue) {
|
||||
}
|
||||
|
||||
// 3D
|
||||
diBuilder3D->setKernel(RegionCoordX::Right, RegionCoordY::Bottom, RegionCoordZ::Back, pKernel);
|
||||
diBuilder3D->setDispatchGeometry(RegionCoordX::Right, RegionCoordY::Bottom, RegionCoordZ::Back, Vec3<size_t>(256, 256, 256), Vec3<size_t>(16, 16, 16), Vec3<size_t>(0, 0, 0));
|
||||
diBuilder3D->setKernel(RegionCoordX::right, RegionCoordY::bottom, RegionCoordZ::back, pKernel);
|
||||
diBuilder3D->setDispatchGeometry(RegionCoordX::right, RegionCoordY::bottom, RegionCoordZ::back, Vec3<size_t>(256, 256, 256), Vec3<size_t>(16, 16, 16), Vec3<size_t>(0, 0, 0));
|
||||
MultiDispatchInfo mdi3D;
|
||||
diBuilder3D->bake(mdi3D);
|
||||
|
||||
@@ -325,13 +325,13 @@ TEST_F(DispatchInfoBuilderTest, GivenSplitWhenCheckingIfBuiltinThenReturnTrue) {
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, GivenNoSplitWhenGettingWalkerInfoThenCorrectValuesAreReturned) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::WalkerSplit> *diBuilder1D = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::WalkerSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::walkerSplit> *diBuilder1D = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::walkerSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder1D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::WalkerSplit> *diBuilder2D = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::WalkerSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::walkerSplit> *diBuilder2D = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::walkerSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder2D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::WalkerSplit> *diBuilder3D = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::WalkerSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::walkerSplit> *diBuilder3D = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::walkerSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder3D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
// 1D
|
||||
@@ -436,13 +436,13 @@ TEST_F(DispatchInfoBuilderTest, GivenNoSplitWhenGettingWalkerInfoThenCorrectValu
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, GivenSplitWhenGettingWalkerInfoThenCorrectValuesAreReturned) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::WalkerSplit> *diBuilder1D = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::WalkerSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::walkerSplit> *diBuilder1D = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::walkerSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder1D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::WalkerSplit> *diBuilder2D = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::WalkerSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::walkerSplit> *diBuilder2D = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::walkerSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder2D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::WalkerSplit> *diBuilder3D = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::WalkerSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::walkerSplit> *diBuilder3D = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::walkerSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder3D); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
// 1D
|
||||
@@ -727,7 +727,7 @@ TEST_F(DispatchInfoBuilderTest, GivenSplitWhenGettingWalkerInfoThenCorrectValues
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, GivenSplit1dWhenSettingDispatchGeometryThenMdiSizeIsCorrect) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::WalkerSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::WalkerSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::walkerSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::walkerSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
diBuilder->setDispatchGeometry(Vec3<size_t>(0, 0, 0), Vec3<size_t>(2, 0, 0), Vec3<size_t>(0, 0, 0));
|
||||
@@ -749,7 +749,7 @@ TEST_F(DispatchInfoBuilderTest, GivenSplit1dWhenSettingDispatchGeometryThenMdiSi
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, GivenSplit2dWhenSettingDispatchGeometryThenMdiSizeIsCorrect) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::WalkerSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::WalkerSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::walkerSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::walkerSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
diBuilder->setDispatchGeometry(Vec3<size_t>(0, 0, 0), Vec3<size_t>(2, 2, 0), Vec3<size_t>(0, 0, 0));
|
||||
@@ -781,7 +781,7 @@ TEST_F(DispatchInfoBuilderTest, GivenSplit2dWhenSettingDispatchGeometryThenMdiSi
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, GivenSplit3dWhenSettingDispatchGeometryThenMdiSizeIsCorrect) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::WalkerSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::WalkerSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::walkerSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::walkerSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
diBuilder->setDispatchGeometry(Vec3<size_t>(0, 0, 0), Vec3<size_t>(2, 2, 2), Vec3<size_t>(0, 0, 0));
|
||||
@@ -842,7 +842,7 @@ TEST_F(DispatchInfoBuilderTest, WhenSettingKernelArgThenAddressesAreCorrect) {
|
||||
auto val = (cl_mem)buffer;
|
||||
auto pVal = &val;
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
diBuilder->setKernel(pKernel);
|
||||
@@ -873,9 +873,9 @@ TEST_F(DispatchInfoBuilderTest, WhenSettingKernelArgThenAddressesAreCorrect) {
|
||||
}
|
||||
|
||||
TEST_F(DispatchInfoBuilderTest, GivenSplitWhenSettingKernelArgThenAddressesAreCorrect) {
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::KernelSplit> builder1D(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::KernelSplit> builder2D(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::KernelSplit> builder3D(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d1D, SplitDispatch::SplitMode::kernelSplit> builder1D(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d2D, SplitDispatch::SplitMode::kernelSplit> builder2D(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::kernelSplit> builder3D(*pClDevice);
|
||||
|
||||
Buffer *buffer = new MockBuffer();
|
||||
auto val = (cl_mem)buffer;
|
||||
@@ -892,9 +892,9 @@ TEST_F(DispatchInfoBuilderTest, GivenSplitWhenSettingKernelArgThenAddressesAreCo
|
||||
Vec3<size_t> elws(16, 16, 16);
|
||||
Vec3<size_t> offset(0, 0, 0);
|
||||
|
||||
builder1D.setDispatchGeometry(SplitDispatch::RegionCoordX::Left, gws, elws, offset);
|
||||
builder2D.setDispatchGeometry(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, gws, elws, offset);
|
||||
builder3D.setDispatchGeometry(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, SplitDispatch::RegionCoordZ::Front, gws, elws, offset);
|
||||
builder1D.setDispatchGeometry(SplitDispatch::RegionCoordX::left, gws, elws, offset);
|
||||
builder2D.setDispatchGeometry(SplitDispatch::RegionCoordX::left, SplitDispatch::RegionCoordY::top, gws, elws, offset);
|
||||
builder3D.setDispatchGeometry(SplitDispatch::RegionCoordX::left, SplitDispatch::RegionCoordY::top, SplitDispatch::RegionCoordZ::front, gws, elws, offset);
|
||||
MultiDispatchInfo mdi1D;
|
||||
MultiDispatchInfo mdi2D;
|
||||
MultiDispatchInfo mdi3D;
|
||||
@@ -905,34 +905,34 @@ TEST_F(DispatchInfoBuilderTest, GivenSplitWhenSettingKernelArgThenAddressesAreCo
|
||||
|
||||
// Set arg
|
||||
clearCrossThreadData();
|
||||
builder1D.setArg(SplitDispatch::RegionCoordX::Left, static_cast<uint32_t>(0), sizeof(cl_mem *), pVal);
|
||||
builder1D.setArg(SplitDispatch::RegionCoordX::left, static_cast<uint32_t>(0), sizeof(cl_mem *), pVal);
|
||||
for (auto &dispatchInfo : mdi1D) {
|
||||
EXPECT_EQ(buffer->getCpuAddress(), *reinterpret_cast<void **>((dispatchInfo.getKernel()->getCrossThreadData() + 0x10)));
|
||||
}
|
||||
clearCrossThreadData();
|
||||
builder2D.setArg(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, static_cast<uint32_t>(0), sizeof(cl_mem *), pVal);
|
||||
builder2D.setArg(SplitDispatch::RegionCoordX::left, SplitDispatch::RegionCoordY::top, static_cast<uint32_t>(0), sizeof(cl_mem *), pVal);
|
||||
for (auto &dispatchInfo : mdi2D) {
|
||||
EXPECT_EQ(buffer->getCpuAddress(), *reinterpret_cast<void **>((dispatchInfo.getKernel()->getCrossThreadData() + 0x10)));
|
||||
}
|
||||
clearCrossThreadData();
|
||||
builder3D.setArg(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, SplitDispatch::RegionCoordZ::Front, static_cast<uint32_t>(0), sizeof(cl_mem *), pVal);
|
||||
builder3D.setArg(SplitDispatch::RegionCoordX::left, SplitDispatch::RegionCoordY::top, SplitDispatch::RegionCoordZ::front, static_cast<uint32_t>(0), sizeof(cl_mem *), pVal);
|
||||
for (auto &dispatchInfo : mdi3D) {
|
||||
EXPECT_EQ(buffer->getCpuAddress(), *reinterpret_cast<void **>((dispatchInfo.getKernel()->getCrossThreadData() + 0x10)));
|
||||
}
|
||||
|
||||
// Set arg SVM
|
||||
clearCrossThreadData();
|
||||
builder1D.setArgSvm(SplitDispatch::RegionCoordX::Left, 1, sizeof(svmPtr), svmPtr, nullptr, 0u);
|
||||
builder1D.setArgSvm(SplitDispatch::RegionCoordX::left, 1, sizeof(svmPtr), svmPtr, nullptr, 0u);
|
||||
for (auto &dispatchInfo : mdi1D) {
|
||||
EXPECT_EQ(svmPtr, *(reinterpret_cast<void **>(dispatchInfo.getKernel()->getCrossThreadData() + 0x30)));
|
||||
}
|
||||
clearCrossThreadData();
|
||||
builder2D.setArgSvm(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, 1, sizeof(svmPtr), svmPtr, nullptr, 0u);
|
||||
builder2D.setArgSvm(SplitDispatch::RegionCoordX::left, SplitDispatch::RegionCoordY::top, 1, sizeof(svmPtr), svmPtr, nullptr, 0u);
|
||||
for (auto &dispatchInfo : mdi2D) {
|
||||
EXPECT_EQ(svmPtr, *(reinterpret_cast<void **>(dispatchInfo.getKernel()->getCrossThreadData() + 0x30)));
|
||||
}
|
||||
clearCrossThreadData();
|
||||
builder3D.setArgSvm(SplitDispatch::RegionCoordX::Left, SplitDispatch::RegionCoordY::Top, SplitDispatch::RegionCoordZ::Front, 1, sizeof(svmPtr), svmPtr, nullptr, 0u);
|
||||
builder3D.setArgSvm(SplitDispatch::RegionCoordX::left, SplitDispatch::RegionCoordY::top, SplitDispatch::RegionCoordZ::front, 1, sizeof(svmPtr), svmPtr, nullptr, 0u);
|
||||
for (auto &dispatchInfo : mdi3D) {
|
||||
EXPECT_EQ(svmPtr, *(reinterpret_cast<void **>(dispatchInfo.getKernel()->getCrossThreadData() + 0x30)));
|
||||
}
|
||||
@@ -946,7 +946,7 @@ TEST_F(DispatchInfoBuilderTest, GivenInvalidInputWhenSettingKernelArgThenInvalid
|
||||
auto val = (cl_mem)buffer;
|
||||
auto pVal = &val;
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
diBuilder->setKernel(pKernel);
|
||||
@@ -974,7 +974,7 @@ TEST_F(DispatchInfoBuilderTest, GivenNullKernelWhenSettingKernelArgThenSuccessIs
|
||||
void *svmPtr = &data;
|
||||
MockGraphicsAllocation svmAlloc(svmPtr, 128);
|
||||
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>(*pClDevice);
|
||||
DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit> *diBuilder = new DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder); // NOLINT(clang-analyzer-cplusplus.NewDeleteLeaks)
|
||||
|
||||
diBuilder->setDispatchGeometry(Vec3<size_t>(256, 256, 256), Vec3<size_t>(16, 16, 16), Vec3<size_t>(0, 0, 0));
|
||||
@@ -992,7 +992,7 @@ TEST_F(DispatchInfoBuilderTest, GivenNullKernelWhenSettingKernelArgThenSuccessIs
|
||||
TEST_F(DispatchInfoBuilderTest, WhenDimensionIsNotSetThenProperDimensionIsReturned) {
|
||||
MultiDispatchInfo mdi;
|
||||
|
||||
auto diBuilder = std::make_unique<DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>>(*pClDevice);
|
||||
auto diBuilder = std::make_unique<DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder);
|
||||
|
||||
diBuilder->setDispatchGeometry(0u, Vec3<size_t>(128, 4, 1), Vec3<size_t>(0, 0, 0), Vec3<size_t>(0, 0, 0));
|
||||
@@ -1005,7 +1005,7 @@ TEST_F(DispatchInfoBuilderTest, WhenDimensionIsNotSetThenProperDimensionIsReturn
|
||||
TEST_F(DispatchInfoBuilderTest, WhengDimensionIsNotMatchingGWSThenDimensionPassedAsArgumentIsReturned) {
|
||||
MultiDispatchInfo mdi;
|
||||
|
||||
auto diBuilder = std::make_unique<DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::NoSplit>>(*pClDevice);
|
||||
auto diBuilder = std::make_unique<DispatchInfoBuilder<SplitDispatch::Dim::d3D, SplitDispatch::SplitMode::noSplit>>(*pClDevice);
|
||||
ASSERT_NE(nullptr, diBuilder);
|
||||
|
||||
diBuilder->setDispatchGeometry(2u, Vec3<size_t>(128, 1, 1), Vec3<size_t>(0, 0, 0), Vec3<size_t>(0, 0, 0));
|
||||
|
||||
@@ -1842,7 +1842,7 @@ using BufferCreateTests = testing::Test;
|
||||
|
||||
HWTEST_F(BufferCreateTests, givenClMemCopyHostPointerPassedToBufferCreateWhenAllocationIsNotInSystemMemoryPoolAndCopyOnCpuEnabledThenAllocationIsWrittenUsingLockedPointerIfAllowed) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessAllowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessAllowed));
|
||||
|
||||
auto executionEnvironment = new MockExecutionEnvironment(defaultHwInfo.get());
|
||||
auto memoryManager = new MockMemoryManager(true, *executionEnvironment);
|
||||
@@ -1930,7 +1930,7 @@ HWTEST_F(BufferCreateTests, givenClMemCopyHostPointerPassedToBufferCreateWhenAll
|
||||
{
|
||||
// local memory cpu access disallowed -> cpu copy disallowed
|
||||
DebugManagerStateRestore subTestRestorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
cl_int retVal;
|
||||
cl_mem_flags flags = CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR;
|
||||
auto writeBufferCounter = commandQueue->writeBufferCounter;
|
||||
|
||||
@@ -147,7 +147,7 @@ using BufferCreateLinuxTests = ::testing::Test;
|
||||
|
||||
HWTEST_F(BufferCreateLinuxTests, givenClMemCopyHostPointerPassedToBufferCreateWhenCpuCopyAllowedThenLockResourceAndWriteBufferCorrectlyCalled) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessAllowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessAllowed));
|
||||
|
||||
auto executionEnvironment = new MockExecutionEnvironment(defaultHwInfo.get());
|
||||
auto memoryManager = new MockMemoryManager(true, *executionEnvironment);
|
||||
@@ -188,7 +188,7 @@ HWTEST_F(BufferCreateLinuxTests, givenClMemCopyHostPointerPassedToBufferCreateWh
|
||||
|
||||
HWTEST_F(BufferCreateLinuxTests, givenClMemCopyHostPointerPassedToBufferCreateWhenCpuCopyDisAllowedThenLockResourceAndWriteBufferCorrectlyCalled) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessAllowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessAllowed));
|
||||
|
||||
auto executionEnvironment = new MockExecutionEnvironment(defaultHwInfo.get());
|
||||
auto memoryManager = new MockMemoryManager(true, *executionEnvironment);
|
||||
|
||||
@@ -146,7 +146,7 @@ using BufferCreateWindowsTests = testing::Test;
|
||||
|
||||
HWTEST_F(BufferCreateWindowsTests, givenClMemCopyHostPointerPassedToBufferCreateWhenCpuCopyAllowedThenLockResourceAndWriteBufferCorrectlyCalled) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessAllowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessAllowed));
|
||||
|
||||
auto executionEnvironment = new MockExecutionEnvironment(defaultHwInfo.get());
|
||||
auto memoryManager = new MockMemoryManager(true, *executionEnvironment);
|
||||
@@ -188,7 +188,7 @@ HWTEST_F(BufferCreateWindowsTests, givenClMemCopyHostPointerPassedToBufferCreate
|
||||
|
||||
HWTEST_F(BufferCreateWindowsTests, givenClMemCopyHostPointerPassedToBufferCreateWhenCpuCopyDisAllowedThenLockResourceAndWriteBufferCorrectlyCalled) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessAllowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessAllowed));
|
||||
|
||||
auto executionEnvironment = new MockExecutionEnvironment(defaultHwInfo.get());
|
||||
auto memoryManager = new MockMemoryManager(true, *executionEnvironment);
|
||||
|
||||
@@ -1130,7 +1130,7 @@ TEST(UnifiedSharedMemoryTransferCalls, givenDeviceUsmAllocationWhenPtrIsUsedForT
|
||||
TEST(UnifiedSharedMemoryTransferCalls, givenHostUsmAllocationWhenPtrIsUsedForTransferCallsThenCPUPathIsChoosen) {
|
||||
DebugManagerStateRestore restorer;
|
||||
debugManager.flags.EnableLocalMemory.set(false);
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::Default));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::defaultMode));
|
||||
MockContext mockContext;
|
||||
cl_context clContext = &mockContext;
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ HWTEST_F(PrintfHandlerTests, givenDisallowedLocalMemoryCpuAccessWhenPrintEnqueue
|
||||
hwInfo.capabilityTable.blitterOperationsSupported = true;
|
||||
|
||||
DebugManagerStateRestore restore;
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed));
|
||||
debugManager.flags.EnableLocalMemory.set(1);
|
||||
|
||||
auto device = std::make_unique<MockClDevice>(MockDevice::createWithNewExecutionEnvironment<MockDevice>(&hwInfo));
|
||||
@@ -351,9 +351,9 @@ TEST_F(PrintfHandlerTests, GivenAllocationInLocalMemoryWhichRequiresBlitterWhenP
|
||||
&BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation};
|
||||
|
||||
LocalMemoryAccessMode localMemoryAccessModes[] = {
|
||||
LocalMemoryAccessMode::Default,
|
||||
LocalMemoryAccessMode::CpuAccessAllowed,
|
||||
LocalMemoryAccessMode::CpuAccessDisallowed};
|
||||
LocalMemoryAccessMode::defaultMode,
|
||||
LocalMemoryAccessMode::cpuAccessAllowed,
|
||||
LocalMemoryAccessMode::cpuAccessDisallowed};
|
||||
|
||||
for (auto localMemoryAccessMode : localMemoryAccessModes) {
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(static_cast<int32_t>(localMemoryAccessMode));
|
||||
@@ -375,7 +375,7 @@ TEST_F(PrintfHandlerTests, GivenAllocationInLocalMemoryWhichRequiresBlitterWhenP
|
||||
printfHandler->prepareDispatch(multiDispatchInfo);
|
||||
|
||||
if (printfHandler->getSurface()->isAllocatedInLocalMemoryPool() &&
|
||||
(localMemoryAccessMode == LocalMemoryAccessMode::CpuAccessDisallowed)) {
|
||||
(localMemoryAccessMode == LocalMemoryAccessMode::cpuAccessDisallowed)) {
|
||||
expectedBlitsCount++;
|
||||
}
|
||||
EXPECT_EQ(expectedBlitsCount, blitsCounter);
|
||||
|
||||
@@ -46,10 +46,10 @@ AubSubCaptureStatus AubSubCaptureManager::checkAndActivateSubCapture(const std::
|
||||
subCaptureIsActive = false;
|
||||
|
||||
switch (subCaptureCommon.subCaptureMode) {
|
||||
case SubCaptureMode::Toggle:
|
||||
case SubCaptureMode::toggle:
|
||||
subCaptureIsActive = isSubCaptureToggleActive();
|
||||
break;
|
||||
case SubCaptureMode::Filter:
|
||||
case SubCaptureMode::filter:
|
||||
subCaptureIsActive = isSubCaptureFilterActive(kernelName);
|
||||
break;
|
||||
default:
|
||||
@@ -79,13 +79,13 @@ const std::string &AubSubCaptureManager::getSubCaptureFileName(const std::string
|
||||
}
|
||||
|
||||
switch (subCaptureCommon.subCaptureMode) {
|
||||
case SubCaptureMode::Filter:
|
||||
case SubCaptureMode::filter:
|
||||
if (currentFileName.empty()) {
|
||||
currentFileName = generateFilterFileName();
|
||||
useToggleFileName = false;
|
||||
}
|
||||
break;
|
||||
case SubCaptureMode::Toggle:
|
||||
case SubCaptureMode::toggle:
|
||||
if (currentFileName.empty()) {
|
||||
currentFileName = generateToggleFileName(kernelName);
|
||||
useToggleFileName = false;
|
||||
|
||||
@@ -20,10 +20,10 @@ class SettingsReader;
|
||||
class AubSubCaptureCommon {
|
||||
public:
|
||||
enum class SubCaptureMode {
|
||||
Off = 0, // subcapture off
|
||||
Filter, // subcapture kernel specified by filter (static regkey)
|
||||
Toggle // toggle subcapture on/off (dynamic regkey)
|
||||
} subCaptureMode = SubCaptureMode::Off;
|
||||
off = 0, // subcapture off
|
||||
filter, // subcapture kernel specified by filter (static regkey)
|
||||
toggle // toggle subcapture on/off (dynamic regkey)
|
||||
} subCaptureMode = SubCaptureMode::off;
|
||||
|
||||
struct SubCaptureFilter {
|
||||
std::string dumpKernelName = "";
|
||||
@@ -47,7 +47,7 @@ class AubSubCaptureManager {
|
||||
using SubCaptureFilter = AubSubCaptureCommon::SubCaptureFilter;
|
||||
|
||||
inline bool isSubCaptureMode() const {
|
||||
return subCaptureCommon.subCaptureMode > SubCaptureMode::Off;
|
||||
return subCaptureCommon.subCaptureMode > SubCaptureMode::off;
|
||||
}
|
||||
|
||||
bool isSubCaptureEnabled() const;
|
||||
|
||||
@@ -187,7 +187,7 @@ CommandStreamReceiver *TbxCommandStreamReceiverHw<GfxFamily>::create(const std::
|
||||
auto subCaptureCommon = aubCenter->getSubCaptureCommon();
|
||||
UNRECOVERABLE_IF(nullptr == subCaptureCommon);
|
||||
|
||||
if (subCaptureCommon->subCaptureMode > AubSubCaptureManager::SubCaptureMode::Off) {
|
||||
if (subCaptureCommon->subCaptureMode > AubSubCaptureManager::SubCaptureMode::off) {
|
||||
csr->subCaptureManager = std::make_unique<AubSubCaptureManager>(fullName, *subCaptureCommon, ApiSpecificConfig::getRegistryPath());
|
||||
}
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ void WddmDirectSubmission<GfxFamily, Dispatcher>::ensureRingCompletion() {
|
||||
template <typename GfxFamily, typename Dispatcher>
|
||||
bool WddmDirectSubmission<GfxFamily, Dispatcher>::allocateOsResources() {
|
||||
// for now only WDDM2.0
|
||||
UNRECOVERABLE_IF(wddm->getWddmVersion() != WddmVersion::WDDM_2_0);
|
||||
UNRECOVERABLE_IF(wddm->getWddmVersion() != WddmVersion::wddm20);
|
||||
|
||||
bool ret = wddm->getWddmInterface()->createMonitoredFence(ringFence);
|
||||
ringFence.currentFenceValue = 1;
|
||||
|
||||
@@ -194,7 +194,7 @@ template <>
|
||||
void GfxCoreHelperHw<Family>::setExtraAllocationData(AllocationData &allocationData, const AllocationProperties &properties, const RootDeviceEnvironment &rootDeviceEnvironment) const {
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
if (productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed) {
|
||||
if (productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::cpuAccessDisallowed) {
|
||||
if (GraphicsAllocation::isCpuAccessRequired(properties.allocationType)) {
|
||||
allocationData.flags.useSystemMemory = true;
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ template <typename GfxFamily>
|
||||
uint64_t BlitCommandsHelper<GfxFamily>::getMaxBlitWidthOverride(const RootDeviceEnvironment &rootDeviceEnvironment) {
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
const auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
if (productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessAllowed) {
|
||||
if (productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::cpuAccessAllowed) {
|
||||
return 1024;
|
||||
}
|
||||
return 0;
|
||||
@@ -27,7 +27,7 @@ template <typename GfxFamily>
|
||||
uint64_t BlitCommandsHelper<GfxFamily>::getMaxBlitHeightOverride(const RootDeviceEnvironment &rootDeviceEnvironment, bool isSystemMemoryPoolUsed) {
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
const auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
if (productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessAllowed) {
|
||||
if (productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::cpuAccessAllowed) {
|
||||
return 1024;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
* Copyright (C) 2021-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -10,9 +10,9 @@
|
||||
namespace NEO {
|
||||
|
||||
enum class LocalMemoryAccessMode {
|
||||
Default = 0,
|
||||
CpuAccessAllowed = 1,
|
||||
CpuAccessDisallowed = 3
|
||||
defaultMode = 0,
|
||||
cpuAccessAllowed = 1,
|
||||
cpuAccessDisallowed = 3
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
@@ -35,7 +35,7 @@ BufferObjectHandleWrapper BufferObjectHandleWrapper::acquireSharedOwnership() {
|
||||
std::lock_guard lock{controlBlock->blockMutex};
|
||||
controlBlock->refCount++;
|
||||
|
||||
return BufferObjectHandleWrapper{boHandle, Ownership::Strong, controlBlock};
|
||||
return BufferObjectHandleWrapper{boHandle, Ownership::strong, controlBlock};
|
||||
}
|
||||
|
||||
BufferObjectHandleWrapper BufferObjectHandleWrapper::acquireWeakOwnership() {
|
||||
@@ -46,7 +46,7 @@ BufferObjectHandleWrapper BufferObjectHandleWrapper::acquireWeakOwnership() {
|
||||
std::lock_guard lock{controlBlock->blockMutex};
|
||||
controlBlock->weakRefCount++;
|
||||
|
||||
return BufferObjectHandleWrapper{boHandle, Ownership::Weak, controlBlock};
|
||||
return BufferObjectHandleWrapper{boHandle, Ownership::weak, controlBlock};
|
||||
}
|
||||
|
||||
BufferObjectHandleWrapper::~BufferObjectHandleWrapper() {
|
||||
@@ -56,7 +56,7 @@ BufferObjectHandleWrapper::~BufferObjectHandleWrapper() {
|
||||
|
||||
std::unique_lock lock{controlBlock->blockMutex};
|
||||
|
||||
if (ownership == Ownership::Strong) {
|
||||
if (ownership == Ownership::strong) {
|
||||
controlBlock->refCount--;
|
||||
} else {
|
||||
controlBlock->weakRefCount--;
|
||||
|
||||
@@ -40,8 +40,8 @@ class BufferObjectHandleWrapper {
|
||||
};
|
||||
|
||||
enum class Ownership : std::uint8_t {
|
||||
Weak = 0,
|
||||
Strong = 1,
|
||||
weak = 0,
|
||||
strong = 1,
|
||||
};
|
||||
|
||||
public:
|
||||
@@ -75,7 +75,7 @@ class BufferObjectHandleWrapper {
|
||||
: boHandle{boHandle}, ownership{ownership}, controlBlock{controlBlock} {}
|
||||
|
||||
int boHandle{};
|
||||
Ownership ownership{Ownership::Strong};
|
||||
Ownership ownership{Ownership::strong};
|
||||
ControlBlock *controlBlock{};
|
||||
};
|
||||
|
||||
|
||||
@@ -269,15 +269,15 @@ bool ProductHelperHw<gfxProduct>::allowCompression(const HardwareInfo &hwInfo) c
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
LocalMemoryAccessMode ProductHelperHw<gfxProduct>::getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
||||
return LocalMemoryAccessMode::Default;
|
||||
return LocalMemoryAccessMode::defaultMode;
|
||||
}
|
||||
|
||||
template <PRODUCT_FAMILY gfxProduct>
|
||||
LocalMemoryAccessMode ProductHelperHw<gfxProduct>::getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
||||
switch (static_cast<LocalMemoryAccessMode>(debugManager.flags.ForceLocalMemoryAccessMode.get())) {
|
||||
case LocalMemoryAccessMode::Default:
|
||||
case LocalMemoryAccessMode::CpuAccessAllowed:
|
||||
case LocalMemoryAccessMode::CpuAccessDisallowed:
|
||||
case LocalMemoryAccessMode::defaultMode:
|
||||
case LocalMemoryAccessMode::cpuAccessAllowed:
|
||||
case LocalMemoryAccessMode::cpuAccessDisallowed:
|
||||
return static_cast<LocalMemoryAccessMode>(debugManager.flags.ForceLocalMemoryAccessMode.get());
|
||||
}
|
||||
return getDefaultLocalMemoryAccessMode(hwInfo);
|
||||
@@ -509,7 +509,7 @@ bool ProductHelperHw<gfxProduct>::isBlitCopyRequiredForLocalMemory(const RootDev
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
return allocation.isAllocatedInLocalMemoryPool() &&
|
||||
(productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed ||
|
||||
(productHelper.getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::cpuAccessDisallowed ||
|
||||
!allocation.isAllocationLockable());
|
||||
}
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ bool OsContextWin::isDirectSubmissionSupported() const {
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
auto isWSL = rootDeviceEnvironment.isWddmOnLinux();
|
||||
|
||||
return !isWSL && wddm.getWddmVersion() == WddmVersion::WDDM_2_0 && productHelper.isDirectSubmissionSupported(rootDeviceEnvironment.getReleaseHelper());
|
||||
return !isWSL && wddm.getWddmVersion() == WddmVersion::wddm20 && productHelper.isDirectSubmissionSupported(rootDeviceEnvironment.getReleaseHelper());
|
||||
}
|
||||
|
||||
OsContextWin::~OsContextWin() {
|
||||
|
||||
@@ -133,7 +133,7 @@ bool Wddm::init() {
|
||||
rootDeviceEnvironment.initGmm();
|
||||
this->rootDeviceEnvironment.getGmmClientContext()->setHandleAllocator(this->hwDeviceId->getUmKmDataTranslator()->createGmmHandleAllocator());
|
||||
|
||||
if (WddmVersion::WDDM_2_3 == getWddmVersion()) {
|
||||
if (WddmVersion::wddm23 == getWddmVersion()) {
|
||||
wddmInterface = std::make_unique<WddmInterface23>(*this);
|
||||
} else {
|
||||
wddmInterface = std::make_unique<WddmInterface20>(*this);
|
||||
@@ -1310,9 +1310,9 @@ void Wddm::updatePagingFenceValue(uint64_t newPagingFenceValue) {
|
||||
|
||||
WddmVersion Wddm::getWddmVersion() {
|
||||
if (featureTable->flags.ftrWddmHwQueues) {
|
||||
return WddmVersion::WDDM_2_3;
|
||||
return WddmVersion::wddm23;
|
||||
} else {
|
||||
return WddmVersion::WDDM_2_0;
|
||||
return WddmVersion::wddm20;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -19,7 +19,7 @@ struct WddmSubmitArguments {
|
||||
};
|
||||
|
||||
enum class WddmVersion : uint32_t {
|
||||
WDDM_2_0 = 0,
|
||||
WDDM_2_3
|
||||
wddm20 = 0,
|
||||
wddm23
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
@@ -102,7 +102,7 @@ void KernelNameTag::bxml(std::ostream &os) {
|
||||
os << "<Instruction Name=\"KernelName\" Source=\"Driver\" Project=\"All\" LengthBias=\"2\">\n";
|
||||
os << " <Description>Name of the kernel.</Description>\n";
|
||||
|
||||
BaseTag::bxml(os, OpCode::KernelName, sizeof(KernelNameTag), "KERNEL_NAME");
|
||||
BaseTag::bxml(os, OpCode::kernelName, sizeof(KernelNameTag), "KERNEL_NAME");
|
||||
|
||||
unsigned int stringDWORDSize = kenelNameStrLength / sizeof(uint32_t);
|
||||
os << " <Dword Name=\"2.." << 2 + stringDWORDSize - 1 << "\">\n";
|
||||
@@ -118,7 +118,7 @@ void ArbitraryStringTag::bxml(std::ostream &os) {
|
||||
os << "<Instruction Name=\"ArbitraryString\" Source=\"Driver\" Project=\"All\" LengthBias=\"2\">\n";
|
||||
os << " <Description>Name of the arbitrary string.</Description>\n";
|
||||
|
||||
BaseTag::bxml(os, OpCode::ArbitraryString, sizeof(ArbitraryStringTag), "ARBITRARY_STRING");
|
||||
BaseTag::bxml(os, OpCode::arbitraryString, sizeof(ArbitraryStringTag), "ARBITRARY_STRING");
|
||||
|
||||
constexpr unsigned int stringDWORDSize = tagStringLength / sizeof(uint32_t);
|
||||
os << " <Dword Name=\"2.." << 2 + stringDWORDSize - 1 << "\">\n";
|
||||
@@ -134,7 +134,7 @@ void PipeControlReasonTag::bxml(std::ostream &os) {
|
||||
os << "<Instruction Name=\"PipeControlReason\" Source=\"Driver\" Project=\"All\" LengthBias=\"2\">\n";
|
||||
os << " <Description>Reason for why the PIPE_CONTROL was inserted.</Description>\n";
|
||||
|
||||
BaseTag::bxml(os, OpCode::PipeControlReason, sizeof(PipeControlReasonTag), "PIPE_CONTROL_REASON");
|
||||
BaseTag::bxml(os, OpCode::pipeControlReason, sizeof(PipeControlReasonTag), "PIPE_CONTROL_REASON");
|
||||
|
||||
unsigned int stringDWORDSize = reasonStrLength / sizeof(uint32_t);
|
||||
os << " <Dword Name=\"2.." << 2 + stringDWORDSize - 1 << "\">\n";
|
||||
@@ -150,7 +150,7 @@ void CallNameBeginTag::bxml(std::ostream &os) {
|
||||
os << "<Instruction Name=\"CallNameBegin\" Source=\"Driver\" Project=\"All\" LengthBias=\"2\">\n";
|
||||
os << " <Description>ZE Call where the GPU originated from.</Description>\n";
|
||||
|
||||
BaseTag::bxml(os, OpCode::CallNameBegin, sizeof(CallNameBeginTag), "ZE_CALL_NAME_BEGIN");
|
||||
BaseTag::bxml(os, OpCode::callNameBegin, sizeof(CallNameBeginTag), "ZE_CALL_NAME_BEGIN");
|
||||
|
||||
unsigned int stringDWORDSize = zeCallNameStrLength / sizeof(uint32_t);
|
||||
os << " <Dword Name=\"2.." << 2 + stringDWORDSize - 1 << "\">\n";
|
||||
@@ -171,7 +171,7 @@ void CallNameEndTag::bxml(std::ostream &os) {
|
||||
os << "<Instruction Name=\"CallNameEnd\" Source=\"Driver\" Project=\"All\" LengthBias=\"2\">\n";
|
||||
os << " <Description>ZE Call where the GPU originated from.</Description>\n";
|
||||
|
||||
BaseTag::bxml(os, OpCode::CallNameEnd, sizeof(CallNameEndTag), "ZE_CALL_NAME_END");
|
||||
BaseTag::bxml(os, OpCode::callNameEnd, sizeof(CallNameEndTag), "ZE_CALL_NAME_END");
|
||||
|
||||
unsigned int stringDWORDSize = zeCallNameStrLength / sizeof(uint32_t);
|
||||
os << " <Dword Name=\"2.." << 2 + stringDWORDSize - 1 << "\">\n";
|
||||
|
||||
@@ -14,22 +14,22 @@ namespace NEO {
|
||||
namespace SWTags {
|
||||
|
||||
enum class OpCode : uint32_t {
|
||||
Unknown,
|
||||
KernelName,
|
||||
PipeControlReason,
|
||||
CallNameBegin,
|
||||
CallNameEnd,
|
||||
ArbitraryString,
|
||||
unknown,
|
||||
kernelName,
|
||||
pipeControlReason,
|
||||
callNameBegin,
|
||||
callNameEnd,
|
||||
arbitraryString,
|
||||
};
|
||||
|
||||
enum class Component : uint32_t {
|
||||
COMMON = 1
|
||||
common = 1
|
||||
};
|
||||
|
||||
struct BXMLHeapInfo {
|
||||
const uint32_t magicNumber = 0xDEB06D0C;
|
||||
const uint32_t heapSize;
|
||||
const uint32_t component = static_cast<uint32_t>(Component::COMMON);
|
||||
const uint32_t component = static_cast<uint32_t>(Component::common);
|
||||
|
||||
BXMLHeapInfo(size_t size) : heapSize(static_cast<uint32_t>(size)) {}
|
||||
|
||||
@@ -39,7 +39,7 @@ struct BXMLHeapInfo {
|
||||
struct SWTagHeapInfo {
|
||||
const uint32_t magicNumber = 0xDEB06DD1;
|
||||
const uint32_t heapSize;
|
||||
const uint32_t component = static_cast<uint32_t>(Component::COMMON);
|
||||
const uint32_t component = static_cast<uint32_t>(Component::common);
|
||||
|
||||
SWTagHeapInfo(size_t size) : heapSize(static_cast<uint32_t>(size)) {}
|
||||
|
||||
@@ -50,7 +50,7 @@ struct BaseTag {
|
||||
public:
|
||||
BaseTag(OpCode code, size_t size) : opcode(static_cast<uint32_t>(code)),
|
||||
reserved(0),
|
||||
component(static_cast<uint32_t>(Component::COMMON)),
|
||||
component(static_cast<uint32_t>(Component::common)),
|
||||
driverDebug(1),
|
||||
dwordCount(static_cast<uint32_t>(size / sizeof(uint32_t) - 2)) {}
|
||||
|
||||
@@ -87,7 +87,7 @@ struct BaseTag {
|
||||
struct KernelNameTag : public BaseTag {
|
||||
public:
|
||||
KernelNameTag(const char *name, uint32_t callId)
|
||||
: BaseTag(OpCode::KernelName, sizeof(KernelNameTag)) {
|
||||
: BaseTag(OpCode::kernelName, sizeof(KernelNameTag)) {
|
||||
strcpy_s(kernelName, kenelNameStrLength, name);
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ struct KernelNameTag : public BaseTag {
|
||||
struct ArbitraryStringTag : public BaseTag {
|
||||
public:
|
||||
ArbitraryStringTag(const char *name)
|
||||
: BaseTag(OpCode::ArbitraryString, sizeof(ArbitraryStringTag)) {
|
||||
: BaseTag(OpCode::arbitraryString, sizeof(ArbitraryStringTag)) {
|
||||
strcpy_s(arbitraryString, tagStringLength, name);
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ struct ArbitraryStringTag : public BaseTag {
|
||||
struct PipeControlReasonTag : public BaseTag {
|
||||
public:
|
||||
PipeControlReasonTag(const char *reason, uint32_t callId)
|
||||
: BaseTag(OpCode::PipeControlReason, sizeof(PipeControlReasonTag)) {
|
||||
: BaseTag(OpCode::pipeControlReason, sizeof(PipeControlReasonTag)) {
|
||||
strcpy_s(reasonString, reasonStrLength, reason);
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ struct PipeControlReasonTag : public BaseTag {
|
||||
struct CallNameBeginTag : public BaseTag {
|
||||
public:
|
||||
CallNameBeginTag(const char *name, uint32_t callId)
|
||||
: BaseTag(OpCode::CallNameBegin, sizeof(CallNameBeginTag)) {
|
||||
: BaseTag(OpCode::callNameBegin, sizeof(CallNameBeginTag)) {
|
||||
strcpy_s(zeCallName, zeCallNameStrLength, name);
|
||||
snprintf(zeCallId, sizeof(uint32_t), "%x", callId);
|
||||
}
|
||||
@@ -145,7 +145,7 @@ struct CallNameBeginTag : public BaseTag {
|
||||
struct CallNameEndTag : public BaseTag {
|
||||
public:
|
||||
CallNameEndTag(const char *name, uint32_t callId)
|
||||
: BaseTag(OpCode::CallNameEnd, sizeof(CallNameEndTag)) {
|
||||
: BaseTag(OpCode::callNameEnd, sizeof(CallNameEndTag)) {
|
||||
strcpy_s(zeCallName, zeCallNameStrLength, name);
|
||||
snprintf(zeCallId, sizeof(uint32_t), "%x", callId);
|
||||
}
|
||||
|
||||
@@ -118,7 +118,7 @@ bool ProductHelperHw<gfxProduct>::isBlitCopyRequiredForLocalMemory(const RootDev
|
||||
}
|
||||
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
if (getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed) {
|
||||
if (getLocalMemoryAccessMode(hwInfo) == LocalMemoryAccessMode::cpuAccessDisallowed) {
|
||||
// Regular L3 WA
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -122,9 +122,9 @@ bool ProductHelperHw<gfxProduct>::allowCompression(const HardwareInfo &hwInfo) c
|
||||
template <>
|
||||
LocalMemoryAccessMode ProductHelperHw<gfxProduct>::getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
||||
if (DG2::isG10(hwInfo) && GfxCoreHelper::isWorkaroundRequired(REVISION_A0, REVISION_B, hwInfo, *this)) {
|
||||
return LocalMemoryAccessMode::CpuAccessDisallowed;
|
||||
return LocalMemoryAccessMode::cpuAccessDisallowed;
|
||||
}
|
||||
return LocalMemoryAccessMode::Default;
|
||||
return LocalMemoryAccessMode::defaultMode;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -141,7 +141,7 @@ void GfxCoreHelperHw<Family>::setExtraAllocationData(AllocationData &allocationD
|
||||
auto &hwInfo = *rootDeviceEnvironment.getHardwareInfo();
|
||||
auto &productHelper = rootDeviceEnvironment.getHelper<ProductHelper>();
|
||||
|
||||
if (LocalMemoryAccessMode::CpuAccessDisallowed == productHelper.getLocalMemoryAccessMode(hwInfo)) {
|
||||
if (LocalMemoryAccessMode::cpuAccessDisallowed == productHelper.getLocalMemoryAccessMode(hwInfo)) {
|
||||
if (properties.allocationType == AllocationType::linearStream ||
|
||||
properties.allocationType == AllocationType::internalHeap ||
|
||||
properties.allocationType == AllocationType::printfSurface ||
|
||||
|
||||
@@ -201,16 +201,16 @@ ZebinWithL0TestCommonModule::ZebinWithL0TestCommonModule(const NEO::HardwareInfo
|
||||
const uint8_t testAdditionalSectionsData[0x10] = {0u};
|
||||
for (const auto &s : additionalSections) {
|
||||
switch (s) {
|
||||
case appendElfAdditionalSection::SPIRV:
|
||||
case appendElfAdditionalSection::spirv:
|
||||
elfEncoder.appendSection(NEO::Zebin::Elf::SHT_ZEBIN_SPIRV, NEO::Zebin::Elf::SectionNames::spv, testAdditionalSectionsData);
|
||||
break;
|
||||
case appendElfAdditionalSection::GLOBAL:
|
||||
case appendElfAdditionalSection::global:
|
||||
elfEncoder.appendSection(NEO::Elf::SHT_PROGBITS, NEO::Zebin::Elf::SectionNames::dataGlobal, testAdditionalSectionsData);
|
||||
break;
|
||||
case appendElfAdditionalSection::CONSTANT:
|
||||
case appendElfAdditionalSection::constant:
|
||||
elfEncoder.appendSection(NEO::Elf::SHT_PROGBITS, NEO::Zebin::Elf::SectionNames::dataConst, testAdditionalSectionsData);
|
||||
break;
|
||||
case appendElfAdditionalSection::CONSTANT_STRING:
|
||||
case appendElfAdditionalSection::constantString:
|
||||
elfEncoder.appendSection(NEO::Elf::SHT_PROGBITS, NEO::Zebin::Elf::SectionNames::dataConstString.str(), testAdditionalSectionsData);
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -28,11 +28,11 @@ inline std::string versionToString(NEO::Zebin::ZeInfo::Types::Version version) {
|
||||
namespace ZebinTestData {
|
||||
|
||||
enum class appendElfAdditionalSection {
|
||||
NONE,
|
||||
SPIRV,
|
||||
GLOBAL,
|
||||
CONSTANT,
|
||||
CONSTANT_STRING
|
||||
none,
|
||||
spirv,
|
||||
global,
|
||||
constant,
|
||||
constantString
|
||||
};
|
||||
|
||||
template <NEO::Elf::ELF_IDENTIFIER_CLASS numBits = NEO::Elf::EI_CLASS_64>
|
||||
|
||||
@@ -173,12 +173,12 @@ bool ProductHelperHw<IGFX_UNKNOWN>::isDirectSubmissionConstantCacheInvalidationN
|
||||
|
||||
template <>
|
||||
LocalMemoryAccessMode ProductHelperHw<IGFX_UNKNOWN>::getDefaultLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
||||
return LocalMemoryAccessMode::Default;
|
||||
return LocalMemoryAccessMode::defaultMode;
|
||||
}
|
||||
|
||||
template <>
|
||||
LocalMemoryAccessMode ProductHelperHw<IGFX_UNKNOWN>::getLocalMemoryAccessMode(const HardwareInfo &hwInfo) const {
|
||||
return LocalMemoryAccessMode::Default;
|
||||
return LocalMemoryAccessMode::defaultMode;
|
||||
}
|
||||
|
||||
template <>
|
||||
|
||||
@@ -161,7 +161,7 @@ TEST_F(AubCenterTests, GivenSetCommandStreamReceiverFlagSetWhenAubManagerIsCreat
|
||||
}
|
||||
|
||||
TEST_F(AubCenterTests, GivenAubCenterInSubCaptureModeWhenItIsCreatedWithoutDebugFilterSettingsThenItInitializesSubCaptureFiltersWithDefaults) {
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Filter));
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::filter));
|
||||
|
||||
MockAubCenter aubCenter(rootDeviceEnvironment, false, "", CommandStreamReceiverType::CSR_AUB);
|
||||
auto subCaptureCommon = aubCenter.getSubCaptureCommon();
|
||||
@@ -173,7 +173,7 @@ TEST_F(AubCenterTests, GivenAubCenterInSubCaptureModeWhenItIsCreatedWithoutDebug
|
||||
}
|
||||
|
||||
TEST_F(AubCenterTests, GivenAubCenterInSubCaptureModeWhenItIsCreatedWithDebugFilterSettingsThenItInitializesSubCaptureFiltersWithDebugFilterSettings) {
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Filter));
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::filter));
|
||||
debugManager.flags.AUBDumpFilterKernelStartIdx.set(10);
|
||||
debugManager.flags.AUBDumpFilterKernelEndIdx.set(100);
|
||||
debugManager.flags.AUBDumpFilterKernelName.set("kernel_name");
|
||||
|
||||
@@ -219,7 +219,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCsrWhenLowPriorityOsContextIsSet
|
||||
|
||||
HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptureModeWhenItIsCreatedThenFileIsNotCreated) {
|
||||
DebugManagerStateRestore stateRestore;
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Filter));
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::filter));
|
||||
std::string fileName = "file_name.aub";
|
||||
MockExecutionEnvironment executionEnvironment(defaultHwInfo.get());
|
||||
executionEnvironment.initializeMemoryManager();
|
||||
@@ -308,7 +308,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
auto aubExecutionEnvironment = getEnvironment<MockAubCsr<FamilyType>>(true, true, true);
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->disableSubCapture();
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
ASSERT_FALSE(aubCsr->subCaptureManager->isSubCaptureEnabled());
|
||||
@@ -328,7 +328,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
aubCsr->initializeEngine();
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubSubCaptureManagerMock->checkAndActivateSubCapture("kernelName");
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
@@ -348,7 +348,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<AUBCommandStreamReceiverHw<FamilyType>>();
|
||||
LinearStream cs(aubExecutionEnvironment->commandBuffer);
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->disableSubCapture();
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
ASSERT_FALSE(aubCsr->subCaptureManager->isSubCaptureEnabled());
|
||||
@@ -459,7 +459,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
LinearStream cs(aubExecutionEnvironment->commandBuffer);
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->disableSubCapture();
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
ASSERT_FALSE(aubCsr->subCaptureManager->isSubCaptureEnabled());
|
||||
@@ -486,7 +486,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInNonStanda
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
LinearStream cs(aubExecutionEnvironment->commandBuffer);
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->disableSubCapture();
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
ASSERT_FALSE(aubCsr->subCaptureManager->isSubCaptureEnabled());
|
||||
@@ -514,7 +514,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
LinearStream cs(aubExecutionEnvironment->commandBuffer);
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubSubCaptureManagerMock->checkAndActivateSubCapture("kernelName");
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
@@ -538,7 +538,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
LinearStream cs(aubExecutionEnvironment->commandBuffer);
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubSubCaptureManagerMock->checkAndActivateSubCapture("kernelName");
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
@@ -661,7 +661,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
||||
auto commandBuffer = aubExecutionEnvironment->commandBuffer;
|
||||
LinearStream cs(commandBuffer);
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubSubCaptureManagerMock->checkAndActivateSubCapture("kernelName");
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
@@ -912,7 +912,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
@@ -930,7 +930,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
@@ -953,7 +953,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
subCaptureManagerMock->setToggleFileName(newFileName);
|
||||
@@ -978,7 +978,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
subCaptureManagerMock->setToggleFileName(newFileName);
|
||||
@@ -1002,7 +1002,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
@@ -1018,7 +1018,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
@@ -1037,7 +1037,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(false);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
@@ -1053,7 +1053,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInSubCaptur
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
@@ -1069,7 +1069,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(false);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
@@ -1086,7 +1086,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(true);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
@@ -1103,7 +1103,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
@@ -1120,7 +1120,7 @@ HWTEST_F(AubCommandStreamReceiverTests, givenAubCommandStreamReceiverInStandalon
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto subCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureManagerMock->setSubCaptureIsActive(true);
|
||||
subCaptureManagerMock->setSubCaptureToggleActive(false);
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(subCaptureManagerMock);
|
||||
|
||||
@@ -458,7 +458,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverInSubCaptureModeWhenPo
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
aubCsr->stream = aubStream.get();
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubSubCaptureManagerMock->checkAndActivateSubCapture("kernelName");
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
@@ -482,7 +482,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverInSubCaptureModeWhenPo
|
||||
auto aubCsr = aubExecutionEnvironment->template getCsr<MockAubCsr<FamilyType>>();
|
||||
aubCsr->stream = aubStream.get();
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->disableSubCapture();
|
||||
aubCsr->subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
ASSERT_FALSE(aubCsr->subCaptureManager->isSubCaptureEnabled());
|
||||
@@ -505,7 +505,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithHardwareContextInS
|
||||
aubCsr.setupContext(osContext);
|
||||
auto hardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
aubSubCaptureManagerMock->checkAndActivateSubCapture("kernelName");
|
||||
aubCsr.subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
@@ -529,7 +529,7 @@ HWTEST_F(AubFileStreamTests, givenAubCommandStreamReceiverWithHardwareContextInS
|
||||
aubCsr.setupContext(osContext);
|
||||
auto hardwareContext = static_cast<MockHardwareContext *>(aubCsr.hardwareContextController->hardwareContexts[0].get());
|
||||
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->disableSubCapture();
|
||||
aubCsr.subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
ASSERT_FALSE(aubCsr.subCaptureManager->isSubCaptureEnabled());
|
||||
|
||||
@@ -57,7 +57,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenItIsCreatedThenItIsInitializ
|
||||
std::string initialFileName = "initial_file_name.aub";
|
||||
AubSubCaptureManagerMock aubSubCaptureManager(initialFileName, subCaptureCommon);
|
||||
|
||||
EXPECT_EQ(AubSubCaptureCommon::SubCaptureMode::Off, subCaptureCommon.subCaptureMode);
|
||||
EXPECT_EQ(AubSubCaptureCommon::SubCaptureMode::off, subCaptureCommon.subCaptureMode);
|
||||
EXPECT_STREQ("", subCaptureCommon.subCaptureFilter.dumpKernelName.c_str());
|
||||
EXPECT_EQ(0u, subCaptureCommon.subCaptureFilter.dumpKernelStartIdx);
|
||||
EXPECT_EQ(static_cast<uint32_t>(-1), subCaptureCommon.subCaptureFilter.dumpKernelEndIdx);
|
||||
@@ -95,7 +95,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenCheckAndActivateSubCaptureIs
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenCheckAndActivateSubCaptureIsCalledButSubCaptureModeIsOffThenSubCaptureIsInactive) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Off;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::off;
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture("kernelName");
|
||||
EXPECT_FALSE(status.isActive);
|
||||
EXPECT_FALSE(status.wasActiveInPreviousEnqueue);
|
||||
@@ -104,7 +104,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerWhenCheckAndActivateSubCaptureIs
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenCheckAndActivateSubCaptureIsCalledAndSubCaptureIsToggledOnThenSubCaptureGetsAndRemainsActivated) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManager.setSubCaptureToggleActive(true);
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture("kernelName");
|
||||
EXPECT_TRUE(status.isActive);
|
||||
@@ -118,7 +118,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenCheckAndActivate
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenCheckAndActivateSubCaptureIsCalledButSubCaptureIsToggledOffThenSubCaptureRemainsDeactivated) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManager.setSubCaptureToggleActive(false);
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture("kernelName");
|
||||
EXPECT_FALSE(status.isActive);
|
||||
@@ -132,7 +132,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenCheckAndActivate
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenCheckAndActivateSubCaptureIsCalledButSubCaptureIsToggledOnAndOffThenSubCaptureGetsActivatedAndDeactivated) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManager.setSubCaptureToggleActive(true);
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture("kernelName");
|
||||
EXPECT_TRUE(status.isActive);
|
||||
@@ -147,7 +147,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenCheckAndActivate
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivateSubCaptureIsCalledAndSubCaptureFilterIsDefaultThenSubCaptureIsActive) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture(kernelName);
|
||||
EXPECT_TRUE(status.isActive);
|
||||
EXPECT_TRUE(aubSubCaptureManager.isSubCaptureActive());
|
||||
@@ -156,7 +156,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivate
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivateSubCaptureIsCalledAndSubCaptureFilterWithValidKernelStartIndexIsSpecifiedThenSubCaptureGetsActivated) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelStartIdx = 0;
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture(kernelName);
|
||||
EXPECT_TRUE(status.isActive);
|
||||
@@ -166,7 +166,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivate
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivateSubCaptureIsCalledAndSubCaptureFilterWithInvalidKernelStartIndexIsSpecifiedThenSubCaptureRemainsDeactivated) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelStartIdx = 1;
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture(kernelName);
|
||||
EXPECT_FALSE(status.isActive);
|
||||
@@ -176,7 +176,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivate
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivateSubCaptureIsCalledAndSubCaptureFilterWithInvalidKernelEndIndexIsSpecifiedThenSubCaptureRemainsDeactivated) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelEndIdx = 0;
|
||||
subCaptureCommon.getKernelCurrentIndexAndIncrement();
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture(kernelName);
|
||||
@@ -187,7 +187,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivate
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivateSubCaptureIsCalledAndSubCaptureFilterWithValidKernelNameIsSpecifiedThenSubCaptureGetsActivated) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = "kernel_name";
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture(kernelName);
|
||||
EXPECT_TRUE(status.isActive);
|
||||
@@ -197,7 +197,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivate
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenCheckAndActivateSubCaptureIsCalledAndSubCaptureFilterWithInvalidKernelNameIsSpecifiedThenSubCaptureRemainsDeactivated) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = "invalid_kernel_name";
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture(kernelName);
|
||||
EXPECT_FALSE(status.isActive);
|
||||
@@ -283,7 +283,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenGetSubCaptureFil
|
||||
std::string toggleFileName = "toggle_file_name.aub";
|
||||
aubSubCaptureManager.setToggleFileName(toggleFileName);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
EXPECT_STREQ(toggleFileName.c_str(), aubSubCaptureManager.getSubCaptureFileName("kernelName").c_str());
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGetSubCaptureFil
|
||||
std::string toggleFileName = "toggle_file_name.aub";
|
||||
aubSubCaptureManager.setToggleFileName(toggleFileName);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
EXPECT_STREQ(toggleFileName.c_str(), aubSubCaptureManager.getSubCaptureFileName("kernelName").c_str());
|
||||
}
|
||||
|
||||
@@ -306,7 +306,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGetSubCaptureFil
|
||||
std::string toggleFileName = "toggle_file_name.aub";
|
||||
aubSubCaptureManager.setToggleFileName(toggleFileName);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
EXPECT_STREQ(toggleFileName.c_str(), aubSubCaptureManager.getSubCaptureFileName("kernelName").c_str());
|
||||
}
|
||||
|
||||
@@ -315,7 +315,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenGetSubCaptureFil
|
||||
|
||||
aubSubCaptureManager.setToggleFileName("");
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
std::string filterFileName = aubSubCaptureManager.generateFilterFileName();
|
||||
EXPECT_STREQ(filterFileName.c_str(), aubSubCaptureManager.getSubCaptureFileName("kernelName").c_str());
|
||||
}
|
||||
@@ -325,7 +325,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGetSubCaptureFil
|
||||
|
||||
aubSubCaptureManager.setToggleFileName("");
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
std::string toggleFileName = aubSubCaptureManager.generateToggleFileName(kernelName);
|
||||
EXPECT_STREQ(toggleFileName.c_str(), aubSubCaptureManager.getSubCaptureFileName(kernelName).c_str());
|
||||
}
|
||||
@@ -333,7 +333,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGetSubCaptureFil
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGetSubCaptureFileNameIsCalledForEmptyDispatchInfoThenGenerateToggleFileNameWithoutKernelName) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("aubfile.aub", subCaptureCommon);
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
auto toggleFileName = aubSubCaptureManager.generateToggleFileName("kernelName");
|
||||
EXPECT_STREQ(toggleFileName.c_str(), aubSubCaptureManager.getSubCaptureFileName("kernelName").c_str());
|
||||
}
|
||||
@@ -348,7 +348,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenGetSubCaptureFil
|
||||
mutable uint32_t generateFilterFileNameCount = 0;
|
||||
} aubSubCaptureManager("", subCaptureCommon, "");
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
aubSubCaptureManager.getSubCaptureFileName("kernelName");
|
||||
aubSubCaptureManager.getSubCaptureFileName("kernelName");
|
||||
aubSubCaptureManager.getSubCaptureFileName("kernelName");
|
||||
@@ -365,7 +365,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGetSubCaptureFil
|
||||
mutable uint32_t generateToggleFileNameCount = 0;
|
||||
} aubSubCaptureManager("", subCaptureCommon, "");
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManager.getSubCaptureFileName("kernelName");
|
||||
aubSubCaptureManager.getSubCaptureFileName("kernelName");
|
||||
aubSubCaptureManager.getSubCaptureFileName("kernelName");
|
||||
@@ -374,7 +374,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGetSubCaptureFil
|
||||
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenGenerateFilterFileNameIsCalledThenItGeneratesFileNameWithStartAndEndIndexes) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("aubfile.aub", subCaptureCommon);
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelStartIdx = 123;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelEndIdx = 456;
|
||||
std::string filterFileName = aubSubCaptureManager.generateFilterFileName();
|
||||
@@ -384,7 +384,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenGenerateFilterFi
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenGenerateFilterFileNameIsCalledAndKernelNameIsSpecifiedInFilterThenItGeneratesFileNameWithNameOfKernel) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("aubfile.aub", subCaptureCommon);
|
||||
std::string kernelName = "kernel_name";
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = kernelName;
|
||||
std::string filterFileName = aubSubCaptureManager.generateFilterFileName();
|
||||
EXPECT_NE(std::string::npos, filterFileName.find(kernelName));
|
||||
@@ -393,7 +393,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenGenerateFilterFi
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenGenerateFilterFileNameIsCalledAndKernelNameIsSpecifiedInFilterThenItGeneratesFileNameWithStartAndEndIndexesOfKernel) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("aubfile.aub", subCaptureCommon);
|
||||
std::string kernelName = "kernel_name";
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = kernelName;
|
||||
subCaptureCommon.subCaptureFilter.dumpNamedKernelStartIdx = 12;
|
||||
subCaptureCommon.subCaptureFilter.dumpNamedKernelEndIdx = 17;
|
||||
@@ -404,7 +404,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenGenerateFilterFi
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGenerateToggleFileNameIsCalledThenItGeneratesFileNameWithKernelCurrentIndex) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("aubfile.aub", subCaptureCommon);
|
||||
std::string kernelCurrentIndex = "from_" + std::to_string(aubSubCaptureManager.getKernelCurrentIndex());
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
std::string filterFileName = aubSubCaptureManager.generateToggleFileName("kernelName");
|
||||
EXPECT_NE(std::string::npos, filterFileName.find(kernelCurrentIndex));
|
||||
}
|
||||
@@ -412,7 +412,7 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGenerateToggleFi
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGenerateToggleFileNameIsCalledAndDispatchInfoIsEmptyThenItGeneratesFileNameWithoutNameOfKernel) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("aubfile.aub", subCaptureCommon);
|
||||
std::string kernelName = "kernel_name";
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = kernelName;
|
||||
std::string toggleFileName = aubSubCaptureManager.generateToggleFileName("kernelName");
|
||||
EXPECT_EQ(std::string::npos, toggleFileName.find(kernelName));
|
||||
@@ -421,12 +421,12 @@ TEST_F(AubSubCaptureTest, givenSubCaptureManagerInToggleModeWhenGenerateToggleFi
|
||||
TEST_F(AubSubCaptureTest, givenSubCaptureManagerInFilterModeWhenKernelNameIsSpecifiedThenNamedKernelIndexesShouldApplyToTheSpecifiedKernel) {
|
||||
AubSubCaptureManagerMock aubSubCaptureManager("aubfile.aub", subCaptureCommon);
|
||||
std::string kernelName = "kernel_name";
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
subCaptureCommon.subCaptureFilter.dumpNamedKernelStartIdx = 1;
|
||||
subCaptureCommon.subCaptureFilter.dumpNamedKernelEndIdx = 1;
|
||||
subCaptureCommon.subCaptureFilter.dumpKernelName = kernelName;
|
||||
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Filter;
|
||||
subCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::filter;
|
||||
auto status = aubSubCaptureManager.checkAndActivateSubCapture(kernelName);
|
||||
EXPECT_FALSE(status.isActive);
|
||||
EXPECT_FALSE(aubSubCaptureManager.isSubCaptureActive());
|
||||
|
||||
@@ -651,7 +651,7 @@ HWTEST_F(SimulatedCsrTest, givenTbxCsrTypeWhenCreateCommandStreamReceiverThenPro
|
||||
|
||||
HWTEST_F(TbxCommandStreamTests, givenTbxCsrWhenCreatedWithAubDumpInSubCaptureModeThenCreateSubCaptureManagerAndGenerateSubCaptureFileName) {
|
||||
DebugManagerStateRestore dbgRestore;
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::Filter));
|
||||
debugManager.flags.AUBDumpSubCaptureMode.set(static_cast<int32_t>(AubSubCaptureManager::SubCaptureMode::filter));
|
||||
|
||||
MockExecutionEnvironment executionEnvironment;
|
||||
executionEnvironment.rootDeviceEnvironments[0]->setHwInfoAndInitHelpers(defaultHwInfo.get());
|
||||
@@ -851,7 +851,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenCheckAndActivateA
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto aubSubCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
tbxCsr.subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
|
||||
EXPECT_FALSE(tbxCsr.dumpTbxNonWritable);
|
||||
@@ -870,7 +870,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenCheckAndActivateA
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto aubSubCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->setSubCaptureIsActive(false);
|
||||
aubSubCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
tbxCsr.subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
@@ -891,7 +891,7 @@ HWTEST_F(TbxCommandStreamTests, givenTbxCsrInSubCaptureModeWhenCheckAndActivateA
|
||||
|
||||
AubSubCaptureCommon aubSubCaptureCommon;
|
||||
auto aubSubCaptureManagerMock = new AubSubCaptureManagerMock("", aubSubCaptureCommon);
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::Toggle;
|
||||
aubSubCaptureCommon.subCaptureMode = AubSubCaptureManager::SubCaptureMode::toggle;
|
||||
aubSubCaptureManagerMock->setSubCaptureIsActive(true);
|
||||
aubSubCaptureManagerMock->setSubCaptureToggleActive(true);
|
||||
tbxCsr.subCaptureManager = std::unique_ptr<AubSubCaptureManagerMock>(aubSubCaptureManagerMock);
|
||||
|
||||
@@ -179,14 +179,14 @@ HWTEST2_F(BlitTests, GivenCpuAccessToLocalMemoryWhenGettingMaxBlitSizeThenValues
|
||||
DebugManagerStateRestore restore{};
|
||||
|
||||
UltDeviceFactory deviceFactory{1, 2};
|
||||
int32_t testedLocalMemoryAccessModes[] = {static_cast<int32_t>(LocalMemoryAccessMode::Default),
|
||||
static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessAllowed),
|
||||
static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessDisallowed)};
|
||||
int32_t testedLocalMemoryAccessModes[] = {static_cast<int32_t>(LocalMemoryAccessMode::defaultMode),
|
||||
static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessAllowed),
|
||||
static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessDisallowed)};
|
||||
|
||||
for (auto localMemoryAccessModeOverride : testedLocalMemoryAccessModes) {
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(localMemoryAccessModeOverride);
|
||||
|
||||
bool isBlitSizeOverridden = (localMemoryAccessModeOverride == static_cast<int32_t>(LocalMemoryAccessMode::CpuAccessAllowed));
|
||||
bool isBlitSizeOverridden = (localMemoryAccessModeOverride == static_cast<int32_t>(LocalMemoryAccessMode::cpuAccessAllowed));
|
||||
|
||||
if (isBlitSizeOverridden) {
|
||||
EXPECT_EQ(1024u, BlitCommandsHelper<FamilyType>::getMaxBlitWidth(deviceFactory.rootDevices[0]->getRootDeviceEnvironment()));
|
||||
|
||||
@@ -333,11 +333,11 @@ HWTEST_F(ProductHelperTest, givenVariousDebugKeyValuesWhenGettingLocalMemoryAcce
|
||||
DebugManagerStateRestore restore{};
|
||||
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(0);
|
||||
EXPECT_EQ(LocalMemoryAccessMode::Default, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::defaultMode, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(1);
|
||||
EXPECT_EQ(LocalMemoryAccessMode::CpuAccessAllowed, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::cpuAccessAllowed, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
debugManager.flags.ForceLocalMemoryAccessMode.set(3);
|
||||
EXPECT_EQ(LocalMemoryAccessMode::CpuAccessDisallowed, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::cpuAccessDisallowed, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
}
|
||||
|
||||
HWTEST_F(ProductHelperTest, givenProductHelperWhenAskedIfAllocationSizeAdjustmentIsRequiredThenFalseIsReturned) {
|
||||
@@ -480,7 +480,7 @@ HWTEST_F(ProductHelperTest, givenLockableAllocationWhenGettingIsBlitCopyRequired
|
||||
EXPECT_TRUE(GraphicsAllocation::isLockable(graphicsAllocation.getAllocationType()));
|
||||
graphicsAllocation.overrideMemoryPool(MemoryPool::localMemory);
|
||||
|
||||
auto expectedDefaultValue = (productHelper->getLocalMemoryAccessMode(pInHwInfo) == LocalMemoryAccessMode::CpuAccessDisallowed);
|
||||
auto expectedDefaultValue = (productHelper->getLocalMemoryAccessMode(pInHwInfo) == LocalMemoryAccessMode::cpuAccessDisallowed);
|
||||
auto &rootDeviceEnvironment = *executionEnvironment->rootDeviceEnvironments[0];
|
||||
|
||||
EXPECT_EQ(expectedDefaultValue, productHelper->isBlitCopyRequiredForLocalMemory(rootDeviceEnvironment, graphicsAllocation));
|
||||
|
||||
@@ -1317,12 +1317,12 @@ TEST_F(Wddm20Tests, givenWddmWhenDiscoverDevicesAndFilterDeviceIdIsTheSameAsTheE
|
||||
|
||||
TEST_F(WddmTest, WhenFeatureFlagHwQueueIsDisabledThenReturnWddm20Version) {
|
||||
wddm->featureTable->flags.ftrWddmHwQueues = 0;
|
||||
EXPECT_EQ(WddmVersion::WDDM_2_0, wddm->getWddmVersion());
|
||||
EXPECT_EQ(WddmVersion::wddm20, wddm->getWddmVersion());
|
||||
}
|
||||
|
||||
TEST_F(WddmTest, WhenFeatureFlagHwQueueIsEnabledThenReturnWddm23Version) {
|
||||
wddm->featureTable->flags.ftrWddmHwQueues = 1;
|
||||
EXPECT_EQ(WddmVersion::WDDM_2_3, wddm->getWddmVersion());
|
||||
EXPECT_EQ(WddmVersion::wddm23, wddm->getWddmVersion());
|
||||
}
|
||||
|
||||
TEST_F(Wddm20WithMockGdiDllTests, GivenCreationSucceedWhenCreatingSeparateMonitorFenceThenReturnFilledStructure) {
|
||||
|
||||
@@ -211,9 +211,9 @@ TEST(AllocateGlobalSurfaceTest, GivenAllocationInLocalMemoryWhichRequiresBlitter
|
||||
&BlitHelperFunctions::blitMemoryToAllocation, mockBlitMemoryToAllocation};
|
||||
|
||||
LocalMemoryAccessMode localMemoryAccessModes[] = {
|
||||
LocalMemoryAccessMode::Default,
|
||||
LocalMemoryAccessMode::CpuAccessAllowed,
|
||||
LocalMemoryAccessMode::CpuAccessDisallowed};
|
||||
LocalMemoryAccessMode::defaultMode,
|
||||
LocalMemoryAccessMode::cpuAccessAllowed,
|
||||
LocalMemoryAccessMode::cpuAccessDisallowed};
|
||||
|
||||
std::vector<uint8_t> initData;
|
||||
initData.resize(64, 7U);
|
||||
@@ -232,7 +232,7 @@ TEST(AllocateGlobalSurfaceTest, GivenAllocationInLocalMemoryWhichRequiresBlitter
|
||||
EXPECT_EQ(nullptr, svmAllocsManager.getSVMAlloc(reinterpret_cast<void *>(static_cast<uintptr_t>(pAllocation->getGpuAddress()))));
|
||||
EXPECT_EQ(AllocationType::constantSurface, pAllocation->getAllocationType());
|
||||
|
||||
if (pAllocation->isAllocatedInLocalMemoryPool() && (localMemoryAccessMode == LocalMemoryAccessMode::CpuAccessDisallowed)) {
|
||||
if (pAllocation->isAllocatedInLocalMemoryPool() && (localMemoryAccessMode == LocalMemoryAccessMode::cpuAccessDisallowed)) {
|
||||
expectedBlitsCount++;
|
||||
}
|
||||
EXPECT_EQ(expectedBlitsCount, blitsCounter);
|
||||
|
||||
@@ -216,9 +216,9 @@ TEST(SoftwareTagsManagerMultiDeviceTests, givenEnableSWTagsAndCreateMultipleSubD
|
||||
|
||||
struct SoftwareTagsParametrizedTests : public ::testing::TestWithParam<SWTags::OpCode> {
|
||||
void SetUp() override {
|
||||
tagMap.emplace(OpCode::KernelName, std::make_unique<KernelNameTag>("", 0u));
|
||||
tagMap.emplace(OpCode::PipeControlReason, std::make_unique<PipeControlReasonTag>("", 0u));
|
||||
tagMap.emplace(OpCode::ArbitraryString, std::make_unique<ArbitraryStringTag>(""));
|
||||
tagMap.emplace(OpCode::kernelName, std::make_unique<KernelNameTag>("", 0u));
|
||||
tagMap.emplace(OpCode::pipeControlReason, std::make_unique<PipeControlReasonTag>("", 0u));
|
||||
tagMap.emplace(OpCode::arbitraryString, std::make_unique<ArbitraryStringTag>(""));
|
||||
}
|
||||
|
||||
std::map<OpCode, std::unique_ptr<BaseTag>> tagMap;
|
||||
@@ -228,9 +228,9 @@ INSTANTIATE_TEST_CASE_P(
|
||||
SoftwareTags,
|
||||
SoftwareTagsParametrizedTests,
|
||||
testing::Values(
|
||||
OpCode::KernelName,
|
||||
OpCode::PipeControlReason,
|
||||
OpCode::ArbitraryString));
|
||||
OpCode::kernelName,
|
||||
OpCode::pipeControlReason,
|
||||
OpCode::arbitraryString));
|
||||
|
||||
TEST_P(SoftwareTagsParametrizedTests, whenGetOpCodeIsCalledThenCorrectValueIsReturned) {
|
||||
auto opcode = GetParam();
|
||||
|
||||
@@ -47,10 +47,10 @@ DG2TEST_F(Dg2ProductHelper, givenDG2WithBSteppingThenMaxThreadsForWorkgroupWAIsN
|
||||
DG2TEST_F(Dg2ProductHelper, givenSteppingWhenAskingForLocalMemoryAccessModeThenDisallowOnA0) {
|
||||
pInHwInfo.platform.usDeviceID = dg2G10DeviceIds[0];
|
||||
pInHwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(REVISION_A0, pInHwInfo);
|
||||
EXPECT_EQ(LocalMemoryAccessMode::CpuAccessDisallowed, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::cpuAccessDisallowed, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
|
||||
pInHwInfo.platform.usRevId = productHelper->getHwRevIdFromStepping(REVISION_B, pInHwInfo);
|
||||
EXPECT_EQ(LocalMemoryAccessMode::Default, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::defaultMode, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
}
|
||||
|
||||
DG2TEST_F(Dg2ProductHelper, givenProductHelperWhenGetCommandsStreamPropertiesSupportThenExpectCorrectValues) {
|
||||
@@ -85,23 +85,23 @@ DG2TEST_F(Dg2ProductHelper, givenDG2WhenGettingLocalMemoryAccessModeThenCorrectV
|
||||
|
||||
pInHwInfo.platform.usRevId = revIdA0;
|
||||
pInHwInfo.platform.usDeviceID = dg2G10DeviceIds[0];
|
||||
EXPECT_EQ(LocalMemoryAccessMode::CpuAccessDisallowed, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::cpuAccessDisallowed, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
|
||||
pInHwInfo.platform.usDeviceID = dg2G11DeviceIds[0];
|
||||
EXPECT_EQ(LocalMemoryAccessMode::Default, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::defaultMode, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
|
||||
pInHwInfo.platform.usDeviceID = dg2G12DeviceIds[0];
|
||||
EXPECT_EQ(LocalMemoryAccessMode::Default, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::defaultMode, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
|
||||
pInHwInfo.platform.usRevId = revIdB0;
|
||||
pInHwInfo.platform.usDeviceID = dg2G10DeviceIds[0];
|
||||
EXPECT_EQ(LocalMemoryAccessMode::Default, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::defaultMode, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
|
||||
pInHwInfo.platform.usDeviceID = dg2G11DeviceIds[0];
|
||||
EXPECT_EQ(LocalMemoryAccessMode::Default, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::defaultMode, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
|
||||
pInHwInfo.platform.usDeviceID = dg2G12DeviceIds[0];
|
||||
EXPECT_EQ(LocalMemoryAccessMode::Default, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
EXPECT_EQ(LocalMemoryAccessMode::defaultMode, productHelper->getLocalMemoryAccessMode(pInHwInfo));
|
||||
}
|
||||
|
||||
DG2TEST_F(Dg2ProductHelper, whenConfiguringHardwareInfoThenWa15010089951IsSet) {
|
||||
|
||||
Reference in New Issue
Block a user