Skip to content

[FOR TESTING ONLY][SYCL] Introduce the Level Zero plugin #1818

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 28 commits into from

Conversation

againull
Copy link
Contributor

@againull againull commented Jun 5, 2020

No description provided.

againull and others added 28 commits May 19, 2020 23:39
Plugin itself consists of the header and the source file plus cmake
file to build the plugin. Also the following changes were made to
suport the Level Zero plugin in SYCL RT:
* New level0 value was added to backend enum
* New PI_LEVEL0 value support was added to SYCL_BE config.
* Docs were updated. Mentioned Level Zero backend and provided the
link to the Level Zero runtime for Intel GPU.
* Changes in sycl cmake file to build level0 plugin by default and to
install it with sycl toolchain.

LIT testing with PI_LEVEL0 backend will be enabled in the following
commits. This commits introduces the plugin and makes it buildable.

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
L0 plugin doesn't support piProgramCompile/piProgramLink commands,
program is built during piProgramCreate.

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
* Fix clang-format issue
* Fix using statement

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Align with changes made for OpenCL plugin in
intel#1638:

* Fix build on Windows by defining __SYCL_BUILD_SYCL_DLL in cmake file
* Export only pi* symbols in libpi_level0.so
* Add test to check exported symbols

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
* Add link to the Level Zero specification
* Revert changes in the section providing links to download low level
runtimes. Links are supposed to be provided in buildbot/dependency.conf
according to upcoming changes intel#1699

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
* Use macro in zeParseError function which is easier to maintain
* Fix env variable naming
* Remove implementation of piEventSetCallback and piEventSetStatus,
make them deprecated. These functions should be removed from PI in the
separate patch because they are not used in the SYCL RT.

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
* Added license header to pi_level0.cpp/pi_level0.hpp
* use unordered_map instead of map where possible
* Refactor _pi_mem::addMapping according to suggestion
* Add sanity checks to piProgramCompile and piPrgoramBuild
* Narrowed extern "C" to exported functions.
* Other minor fixes

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
* Remove unnecessary empty commented lines.
* Create _pi_object base class for pi classes to store common data like
reference counter.
* Replace ZE_SUPPORTED_EXTENSIONS macro with constexpr
* Rename "checkThis" method to more informative "doCall" in ZeCall class
and remove unnesseccary static method from this class.
* Check that ZE_MAX_NUMBER_OF_EVENTS_PER_EVENT_POOL is not zero
* Use std::call_once to call zeInit only once and to guarantee that
current SIGSEGV signal handling using signal() will be correct (which
works only for one time signal emit).
* Add comments to _pi_mem interface
* Add missing dots in the comments with multiple sentences.
* Other minor fixes according to suggestion.

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
* Get rid of SET_PARAM_VALUE* macro
* Fix emplace_back usage
* If L0 loader is downloaded github then add it to deploy-sycl-toolchain
* Added ability to provide local version of the L0 headers and loader

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Handling of the segfault which could happen during zeInit should be
handled using sigaction. Removed current implementation, new
implementation will be added separately.

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
* Include Level Zero to pi unit testing
* Provide correct flag during buffer creation in EnqueueMemTest unit
test
* Wait after piEnqueueMemBufferFill in EnqueueMemTest unit test because
otherwise it is not guaranteed that buffer will be filled with data
before reading to the host.
* Event provided to pi call can be null if we don't want to track status
of the enqueued command. Handle this case in L0 plugin.
* Handle PI_DEVICE_TYPE_DEFAULT in L0 plugin properly

Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
Signed-off-by: Artur Gainullin <artur.gainullin@intel.com>
@againull againull closed this Jun 5, 2020
@againull againull deleted the l0_plugin_abort_guilty branch December 3, 2022 00:03
KornevNikita pushed a commit to KornevNikita/llvm that referenced this pull request Feb 2, 2023
This change continues intel#1749.
We are removing SPV_INTEL_non_constant_addrspace_printf extension in
favor of SPV_EXT_relaxed_printf_string_address_space, which are
basically the same.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@ac7a759
KornevNikita pushed a commit to KornevNikita/llvm that referenced this pull request Feb 20, 2023
This change continues intel#1749.
We are removing SPV_INTEL_non_constant_addrspace_printf extension in
favor of SPV_EXT_relaxed_printf_string_address_space, which are
basically the same.

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@ac7a759
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant