mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Ocloc compile: support gen families exposed in help
fix typo in method name Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
85a18d4dc9
commit
5a5ad64f5d
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -29,7 +29,7 @@ bool requestedFatBinary(const std::vector<std::string> &args) {
|
||||
const bool hasMoreArgs = (argIndex + 1 < args.size());
|
||||
if ((ConstStringRef("-device") == currArg) && hasMoreArgs) {
|
||||
ConstStringRef deviceArg(args[argIndex + 1]);
|
||||
return deviceArg.contains("*") || deviceArg.contains("-") || deviceArg.contains(",") || deviceArg.contains("gen");
|
||||
return deviceArg.contains("*") || deviceArg.contains("-") || deviceArg.contains(",") || deviceArg.containsCaseInsensitive("gen");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -112,7 +112,7 @@ std::vector<ConstStringRef> getTargetPlatformsForFatbinary(ConstStringRef device
|
||||
|
||||
if (range.size() == 1) {
|
||||
// open range , from-max or min-to
|
||||
if (range[0].contains("gen")) {
|
||||
if (range[0].containsCaseInsensitive("gen")) {
|
||||
auto coreIdList = asGfxCoreIdList(range[0]);
|
||||
if (coreIdList.empty()) {
|
||||
argHelper->printf("Unknown device : %s\n", set.str().c_str());
|
||||
@@ -197,7 +197,7 @@ std::vector<ConstStringRef> getTargetPlatformsForFatbinary(ConstStringRef device
|
||||
requestedPlatforms.insert(requestedPlatforms.end(), from, to);
|
||||
}
|
||||
}
|
||||
} else if (set.contains("gen")) {
|
||||
} else if (set.containsCaseInsensitive("gen")) {
|
||||
if (set.size() == genArg.size()) {
|
||||
argHelper->printf("Invalid gen-based device : %s - gen should be followed by a number\n", set.str().c_str());
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user