This commit switches the device ID logic from the deprecated
to the new one, so that if the user passes a hex value to the -device
parameter, ocloc will use the new implementation in the product config
helper. The change also introduces a fix for setting the values in the
correct order to configure the hwIfno correctly.
Signed-off-by: Daria Hinz daria.hinz@intel.com
Related-To: NEO-7487
This commit is to introduce optimizations in ocloc when building
targets for release and family.
Instead of building fatbinary after all available targets in
the RTL ID table, we introduce optimizations when there is an
acronym available for the platform in the DEVICE table,
we limit to them only.
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-7582
Usage of initializer list in for loop to iterate over heavy types
has bad consequences. std::initialize_list is only a view and its
data is silently created as T[N]. Therefore, if someone uses
std::vector with it, it will cause deep-copying of the elements.
This change introduces usage of pointers on std::initializer_list
to perform a shallow-copy of an addresses. Furthermore, it adds
const references in few places, where copy is not needed.
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This PR includes:
- Move product config implementation from
ocloc arg helper to product config helper.
- Add default device id setting for each platform configuration.
- Add & move hw info config tests from opencl to shared
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-7112
AOT version (major.minor.revision) is one of
the supported variants for -device arg in ocloc.
In this change, version support has been added
when passing specific targets to -device using ",".
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
In addition to supporting the official -device acronyms
(e.g. xe-hpg), support for shorter and deprecated acronyms
has also been added.
An example of supported variances:
- xehpg
- xe_hpg
- xe_hpg_core
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-6910
Ocloc will handle any new values that may be
passed to the -device argument.
Supported acronyms are available under cmd:
ocloc compile --help
Supported patterns:
- device acronym
- release acronym
- family acronym
- version (major.minor.revision)
Fatbinary will no longer handle major.minor.revision variances,
only acronyms allowed.
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Ocloc will handle any new values that may be
passed to the -device argument.
Supported acronyms are available under cmd:
ocloc compile --help
Supported patterns:
- device acronym
- release acronym
- family acronym
- version (major.minor.revision)
Fatbinary will no longer handle major.minor.revision variances,
only acronyms allowed.
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
This change introduces ULTs for buildFatBinary() function.
It is intended to improve code coverage.
Related-To: NEO-6834
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
Change modifies the encoding entry in fatbinary for platforms.
If numbering in -device is used, the value PRODUCT_CONFIG will be encoded.
The functionality that returns the correct product config values has
also been added.
Related-To: NEO-6744
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
This change contains ULTs for buildFatBinaryForTarget().
They are intented to cover untested code. Moreover,
the function signature has been changed to avoid copying
of std::vector of arguments.
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This change prevents embedding identical SPIR-V section for each
target requested in fatbinary build. Instead of duplicating SPIR-V,
a new file called 'generic_ir' is added to AR archive. It contains
SPIR-V, which was used to build fatbinary. Build fallback in runtime
has been also adjusted - if 'generic_ir' file is defined in fatbinary
and there is no matching binary, then this generic SPIR-V is used to
rebuild for the requested target.
Additionally, MockOclocArgumentHelper::loadDataFromFile() was adjusted
to ensure null-termination of returned strings.
This change also removes possible undefined behavior, which was
related to reading names of files from AR archive. Previously,
if filename was shorter than requested target name, we tried to
read more memory than allowed.
Related-To: NEO-6490
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
In some cases, when a user passes -device in the form of
<major>.<minor>.<revision> (e.g. 12.0.0) ocloc requests fatBinary.
There is no need to duplicate compatible binaries.
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Added 'link' option to ocloc CLI, which allows linking of
several IR files to single output file. Supported formats
of output file are ELF and LLVM BC.
Related-To: NEO-6163
Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
For AOT feature, a new approach to passing
the -device arg to ocloc is implemented.
New character: <Major>.<Minor>.<Revision>
Signed-off-by: Daria Hinz <daria.hinz@intel.com>
Related-To: NEO-5954
Dates corrected in copyright headers to reflect original publication date
(2018 for OpenCL, 2020 for Level Zero).
Signed-off-by: lgotszal <lukasz.gotszald@intel.com>