Revert "Fail build program on PVC with stateful accesses"

This reverts commit 9466113cef.

Signed-off-by: Compute-Runtime-Validation <compute-runtime-validation@intel.com>
This commit is contained in:
Compute-Runtime-Validation
2022-02-14 18:18:34 +01:00
committed by Compute-Runtime-Automation
parent cec0ea2809
commit c5c3e865f0
13 changed files with 40 additions and 419 deletions

View File

@@ -16,7 +16,6 @@
namespace NEO {
namespace CompilerOptions {
static constexpr ConstStringRef greaterThan4gbBuffersRequired = "-cl-intel-greater-than-4GB-buffer-required";
static constexpr ConstStringRef smallerThan4gbBuffersOnly = "-cl-opt-smaller-than-4GB-buffers-only";
static constexpr ConstStringRef hasBufferOffsetArg = "-cl-intel-has-buffer-offset-arg";
static constexpr ConstStringRef kernelDebugEnable = "-cl-kernel-debug-enable";
static constexpr ConstStringRef arch32bit = "-m32";

View File

@@ -238,7 +238,6 @@ DECLARE_DEBUG_VARIABLE(bool, DisableStatelessToStatefulOptimization, false, "Dis
DECLARE_DEBUG_VARIABLE(bool, DisableConcurrentBlockExecution, false, "disables concurrent block kernel execution")
DECLARE_DEBUG_VARIABLE(bool, UseNoRingFlushesKmdMode, true, "Windows only, passes flag to KMD that informs KMD to not emit any ring buffer flushes.")
DECLARE_DEBUG_VARIABLE(bool, DisableZeroCopyForUseHostPtr, false, "When active all buffer allocations created with CL_MEM_USE_HOST_PTR flag will not share memory with CPU.")
DECLARE_DEBUG_VARIABLE(int32_t, UseSmallerThan4gbBuffersOnly, -1, " -1: default, 0: disabled, 1: enabled. When enabled, the driver will not force stateless accesses on devices with default stateless addressing mode")
DECLARE_DEBUG_VARIABLE(int32_t, EnableHostPtrTracking, -1, "Enable host ptr tracking: -1 - default platform setting, 0 - disabled, 1 - enabled")
DECLARE_DEBUG_VARIABLE(int32_t, MaxHwThreadsPercent, 0, "If not zero then maximum number of used HW threads is capped to max * MaxHwThreadsPercent / 100")
DECLARE_DEBUG_VARIABLE(int32_t, MinHwThreadsUnoccupied, 0, "If not zero then maximum number of used HW threads is reduced by MinHwThreadsUnoccupied")

View File

@@ -7,8 +7,6 @@
set(NEO_CORE_HELPERS
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
${CMAKE_CURRENT_SOURCE_DIR}/abort.h
${CMAKE_CURRENT_SOURCE_DIR}/addressing_mode_helper.h
${CMAKE_CURRENT_SOURCE_DIR}/addressing_mode_helper.cpp
${CMAKE_CURRENT_SOURCE_DIR}/address_patch.h
${CMAKE_CURRENT_SOURCE_DIR}/affinity_mask.h
${CMAKE_CURRENT_SOURCE_DIR}/aligned_memory.h

View File

@@ -1,45 +0,0 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/helpers/addressing_mode_helper.h"
#include "shared/source/compiler_interface/compiler_options/compiler_options_base.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/helpers/compiler_hw_info_config.h"
#include "shared/source/program/kernel_info.h"
namespace NEO::AddressingModeHelper {
bool forceToStatelessNeeded(const std::string &options, const std::string &smallerThan4GbBuffersOnlyOption, const HardwareInfo &hwInfo) {
auto preferStateful = false;
if (NEO::CompilerOptions::contains(options, smallerThan4GbBuffersOnlyOption)) {
preferStateful = true;
}
if (NEO::DebugManager.flags.UseSmallerThan4gbBuffersOnly.get() != -1) {
preferStateful = static_cast<bool>(NEO::DebugManager.flags.UseSmallerThan4gbBuffersOnly.get());
}
const auto &compilerHwInfoConfig = *CompilerHwInfoConfig::get(hwInfo.platform.eProductFamily);
auto forceStateless = !preferStateful && compilerHwInfoConfig.isForceToStatelessRequired();
return forceStateless;
}
bool containsStatefulAccess(const std::vector<KernelInfo *> &kernelInfos) {
for (const auto &kernelInfo : kernelInfos) {
for (const auto &arg : kernelInfo->kernelDescriptor.payloadMappings.explicitArgs) {
auto isStatefulAccess = arg.is<NEO::ArgDescriptor::ArgTPointer>() &&
(NEO::isValidOffset(arg.as<NEO::ArgDescPointer>().bindless) ||
NEO::isValidOffset(arg.as<NEO::ArgDescPointer>().bindful));
if (isStatefulAccess) {
return true;
}
}
}
return false;
}
} // namespace NEO::AddressingModeHelper

View File

@@ -1,22 +0,0 @@
/*
* Copyright (C) 2021-2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#pragma once
#include <string>
#include <vector>
namespace NEO {
struct KernelInfo;
struct HardwareInfo;
namespace AddressingModeHelper {
bool forceToStatelessNeeded(const std::string &options, const std::string &smallerThan4GbBuffersOnlyOption, const HardwareInfo &hwInfo);
bool containsStatefulAccess(const std::vector<KernelInfo *> &kernelInfos);
} // namespace AddressingModeHelper
} // namespace NEO