fix: remove deprecated patchtokens format from ocloc

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-08-13 13:14:15 +00:00
committed by Compute-Runtime-Automation
parent a5491f5c67
commit a46181b2c5
8 changed files with 23 additions and 126 deletions

View File

@@ -1448,7 +1448,6 @@ Usage: ocloc [compile] -file <filename> -device <device_type> [-output <filename
--format Enforce given binary format. The possible values are:
--format zebin - Enforce generating zebin binary
--format patchtokens - Enforce generating patchtokens (legacy) binary.
-stateful_address_mode Enforce given addressing mode. The possible values are:
-stateful_address_mode bindful - enforce generating in bindful mode
@@ -1727,7 +1726,7 @@ void OfflineCompiler::enforceFormat(std::string &format) {
if (format == "zebin") {
// zebin is enabled by default
} else if (format == "patchtokens") {
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::disableZebin);
argHelper->printf("WARNING: Ignoring deprecated '--format patchtokens' option.\n");
} else {
argHelper->printf("Invalid format passed: %s. Ignoring.\n", format.c_str());
}

View File

@@ -612,15 +612,6 @@ CIF::RAII::UPtr_t<IGC::IgcOclTranslationCtxTagOCL> CompilerInterface::createFina
return deviceCtx->CreateTranslationCtx(inType, outType);
}
bool CompilerInterface::addOptionDisableZebin(std::string &options, std::string &internalOptions) {
CompilerOptions::concatenateAppend(internalOptions, CompilerOptions::disableZebin);
return true;
}
bool CompilerInterface::disableZebin(std::string &options, std::string &internalOptions) {
return addOptionDisableZebin(options, internalOptions);
}
bool CompilerInterface::isFclAvailable(const Device *device) {
return useIgcAsFcl(device) ? isIgcAvailable(device) : static_cast<bool>(fcl.entryPoint);
}
@@ -810,4 +801,4 @@ CompilerCacheHelper::WhitelistedIncludesVec CompilerCacheHelper::whitelistedIncl
"#include <cm/cm.h>",
"#include <cm/cmtl.h>"};
} // namespace NEO
} // namespace NEO

View File

@@ -150,9 +150,6 @@ class CompilerInterface : NEO::NonCopyableAndNonMovableClass {
MOCKABLE_VIRTUAL CIF::RAII::UPtr_t<IGC::IgcFeaturesAndWorkaroundsTagOCL> getIgcFeaturesAndWorkarounds(const NEO::Device &device);
bool addOptionDisableZebin(std::string &options, std::string &internalOptions);
bool disableZebin(std::string &options, std::string &internalOptions);
protected:
struct CompilerLibraryEntry {
std::string revision;

View File

@@ -33,7 +33,6 @@ inline constexpr ConstStringRef bindlessMode = "-cl-intel-use-bindless-mode -cl-
inline constexpr ConstStringRef uniformWorkgroupSize = "-cl-uniform-work-group-size";
inline constexpr ConstStringRef forceEmuInt32DivRem = "-cl-intel-force-emu-int32divrem";
inline constexpr ConstStringRef forceEmuInt32DivRemSP = "-cl-intel-force-emu-sp-int32divrem";
inline constexpr ConstStringRef disableZebin = "-cl-intel-disable-zebin";
inline constexpr ConstStringRef enableImageSupport = "-D__IMAGE_SUPPORT__=1";
inline constexpr ConstStringRef optLevel = "-ze-opt-level=O";
inline constexpr ConstStringRef excludeIrFromZebin = "-exclude-ir-from-zebin";

View File

@@ -61,12 +61,6 @@ using HasStatefulSupport = IsNotAnyGfxCores<IGFX_XE_HPC_CORE>;
using HasNoStatefulSupport = IsAnyGfxCores<IGFX_XE_HPC_CORE>;
using HasOclocZebinFormatEnforced = IsAnyProducts<IGFX_TIGERLAKE_LP,
IGFX_ROCKETLAKE,
IGFX_ALDERLAKE_S,
IGFX_ALDERLAKE_P,
IGFX_ALDERLAKE_N>;
struct HasDispatchAllSupport {
template <PRODUCT_FAMILY productFamily>
static constexpr bool isMatched() {

View File

@@ -1455,22 +1455,6 @@ struct MockCompilerInterfaceWithUnknownInterfaceCIFMain : MockCompilerInterface
}
};
TEST(TestCompilerInterface, givenOptionsWhenCallDisableZebinThenProperOptionsAreSet) {
DebugManagerStateRestore dbgRestore;
debugManager.flags.EnableDebugBreak.set(0);
debugManager.flags.PrintDebugMessages.set(0);
auto dummyValid = new MockCIFMain();
auto mockCompilerInterface = std::make_unique<MockCompilerInterface>();
mockCompilerInterface->defaultIgc.entryPoint.reset(dummyValid);
std::string options = "";
std::string internalOptions = "";
EXPECT_TRUE(mockCompilerInterface->disableZebin(options, internalOptions));
EXPECT_TRUE(CompilerOptions::contains(internalOptions, NEO::CompilerOptions::disableZebin.str()));
}
TEST(TranslationOutput, givenNonEmptyPointerAndSizeWhenMakingCopyThenCloneInputData) {
MockCIFBuffer src;
src.data.assign({2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37});
@@ -1603,4 +1587,4 @@ TEST(getOclCExtensionVersion, whenCheckingVersionOfUntrackedExtensionThenReturns
cl_version defaultVer = CL_MAKE_VERSION(7, 2, 5);
cl_version ver = NEO::getOclCExtensionVersion("other", defaultVer);
EXPECT_EQ(defaultVer, ver);
}
}