Skip to content

Mirror intel/llvm commits #2769

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/intel-llvm-mirror-base-commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
35e0354eaad5721b487824262857a4ea1b816c21
d8a66b8c5b7a964fd050d0a8f814fedcd0259211
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ set(UR_SYCL_LIBRARY_DIR "" CACHE PATH
set(UR_CONFORMANCE_TARGET_TRIPLES "" CACHE STRING
"List of sycl targets to build CTS device binaries for")
set(UR_CONFORMANCE_AMD_ARCH "" CACHE STRING "AMD device target ID to build CTS binaries for")
option(UR_CONFORMANCE_ENABLE_MATCH_FILES "Enable CTS match files" ON)
option(UR_CONFORMANCE_TEST_LOADER "Also test the loader in the conformance tests" OFF)
set(UR_CONFORMANCE_SELECTOR "" CACHE STRING "If nonempty, the device selector for conformance tests")
option(UR_USE_DEBUG_POSTFIX "Enable debug postfix 'd' for libraries" OFF)
set(UR_ADAPTER_LEVEL_ZERO_SOURCE_DIR "" CACHE PATH
"Path to external 'level_zero' adapter source dir")
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,7 @@ List of options provided by CMake:
| UR_ENABLE_SANITIZER | Enable device sanitizer layer | ON/OFF | ON |
| UR_CONFORMANCE_TARGET_TRIPLES | SYCL triples to build CTS device binaries for | Comma-separated list | spir64 |
| UR_CONFORMANCE_AMD_ARCH | AMD device target ID to build CTS binaries for | string | `""` |
| UR_CONFORMANCE_ENABLE_MATCH_FILES | Enable CTS match files | ON/OFF | ON |
| UR_CONFORMANCE_TEST_LOADER | Additionally build and run "loader" tests for the CTS | ON/OFF | OFF |
| UR_CONFORMANCE_SELECTOR | `ONEAPI_DEVICE_SELECTOR` for conformance testing | string | All enabled adapters |
| UR_BUILD_ADAPTER_L0 | Build the Level-Zero adapter | ON/OFF | OFF |
| UR_BUILD_ADAPTER_OPENCL | Build the OpenCL adapter | ON/OFF | OFF |
| UR_BUILD_ADAPTER_CUDA | Build the CUDA adapter | ON/OFF | OFF |
Expand Down
17 changes: 12 additions & 5 deletions scripts/core/CONTRIB.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,21 @@ Conformance tests *must* not make assumptions about the adapter under test.
Tests fixtures or cases *must* query for support of optional features and skip
testing if unsupported by the adapter.

All tests in the Unified Runtime project are configured to use CTest to run.
All conformance tests have the ``conformance`` label attached to them which
allows them to be run independently. To run all the conformance tests, execute
the following command from the build directory.
Conformance tests are ran as part of the main ``test`` target, but can also be
executed using the `check-unified-runtime-conformance` target as follows:

.. code-block:: console

ctest -L "conformance"
cmake --build build --target check-unified-runtime-conformance

A specific device/adapter can be specified by using ``ONEAPI_DEVICE_SELECTOR``
in the same way as in the `DPC++ compiler
<https://github.com/intel/llvm/blob/sycl/sycl/doc/EnvironmentVariables.md#oneapi_device_selector>`_.

A number of tests are skipped on certain adapters due to being known failures.
To force all tests to run, including known failures,
``UR_CTS_ALSO_RUN_KNOWN_FAILURES`` may be set to ``1`` as an environment
variable.

Experimental Features
=====================
Expand Down
10 changes: 5 additions & 5 deletions scripts/core/INTRO.rst
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ By default, no layers are enabled. Layers currently included with the runtime ar
* - UR_LAYER_LIFETIME_VALIDATION
- Performs lifetime validation on objects (check if it was used within the scope of its creation and destruction) used in API calls. Automatically enables UR_LAYER_LEAK_CHECKING.
* - UR_LAYER_FULL_VALIDATION
- Enables UR_LAYER_PARAMETER_VALIDATION and UR_LAYER_LEAK_CHECKING.
- Enables UR_LAYER_PARAMETER_VALIDATION, UR_LAYER_BOUNDS_CHECKING, UR_LAYER_LEAK_CHECKING, and UR_LAYER_LIFETIME_VALIDATION.
* - UR_LAYER_TRACING
- Enables the XPTI tracing layer, see Tracing_ for more detail.
* - UR_LAYER_ASAN \| UR_LAYER_MSAN \| UR_LAYER_TSAN
Expand Down Expand Up @@ -417,12 +417,12 @@ CTS Environment Variables

The following environment variables are used by the CTS runner and can be used to specify the platform that the test
framework should run on. This can be used during development and testing to run CTS tests in case multiple platforms
are available. If both filters are specified, then they both must match a platform for it to be selected. If there are
no valid platforms, then the tests will fail. Command line arguments take priority over these variables.
are available. Conformance tests will be skipped if there are no valid platforms.

.. envvar:: UR_CTS_BACKEND
.. envvar:: ONEAPI_DEVICE_SELECTOR

A (case insensitive) backend to force the test to use. For example, `opencl`, `level_zero`, `hip` and so on.
If ``ONEAPI_DEVICE_SELECTOR`` is set in the environment, only devices
matched by the selector will be tested.

.. envvar:: UR_CTS_ALSO_RUN_KNOWN_FAILURES

Expand Down
175 changes: 0 additions & 175 deletions scripts/ctest_parser.py

This file was deleted.

11 changes: 3 additions & 8 deletions source/adapters/hip/usm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ ur_result_t USMDeviceAllocImpl(void **ResultPtr, ur_context_handle_t,
return Err;
}

assert(checkUSMImplAlignment(Alignment, ResultPtr));
assert(isPointerAlignedTo(Alignment, *ResultPtr));
return UR_RESULT_SUCCESS;
}

Expand All @@ -160,7 +160,7 @@ ur_result_t USMSharedAllocImpl(void **ResultPtr, ur_context_handle_t,
return Err;
}

assert(checkUSMImplAlignment(Alignment, ResultPtr));
assert(isPointerAlignedTo(Alignment, *ResultPtr));
return UR_RESULT_SUCCESS;
}

Expand All @@ -174,7 +174,7 @@ ur_result_t USMHostAllocImpl(void **ResultPtr,
return Err;
}

assert(checkUSMImplAlignment(Alignment, ResultPtr));
assert(isPointerAlignedTo(Alignment, *ResultPtr));
return UR_RESULT_SUCCESS;
}

Expand Down Expand Up @@ -485,11 +485,6 @@ bool checkUSMAlignment(uint32_t &alignment, const ur_usm_desc_t *pUSMDesc) {
(alignment == 0 || ((alignment & (alignment - 1)) == 0)));
}

bool checkUSMImplAlignment(uint32_t Alignment, void **ResultPtr) {
return Alignment == 0 ||
reinterpret_cast<std::uintptr_t>(*ResultPtr) % Alignment == 0;
}

UR_APIEXPORT ur_result_t UR_APICALL urUSMPoolCreateExp(ur_context_handle_t,
ur_device_handle_t,
ur_usm_pool_desc_t *,
Expand Down
2 changes: 0 additions & 2 deletions source/adapters/hip/usm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,3 @@ ur_result_t USMHostAllocImpl(void **ResultPtr, ur_context_handle_t Context,
uint32_t Alignment);

bool checkUSMAlignment(uint32_t &alignment, const ur_usm_desc_t *pUSMDesc);

bool checkUSMImplAlignment(uint32_t Alignment, void **ResultPtr);
Loading