{"id":20725613,"url":"https://github.com/oneapi-src/unified-runtime","last_synced_at":"2025-04-04T12:07:50.379Z","repository":{"id":62962982,"uuid":"508062186","full_name":"oneapi-src/unified-runtime","owner":"oneapi-src","description":null,"archived":false,"fork":false,"pushed_at":"2024-10-29T10:38:34.000Z","size":17400,"stargazers_count":36,"open_issues_count":206,"forks_count":115,"subscribers_count":21,"default_branch":"main","last_synced_at":"2024-10-29T11:36:40.897Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://oneapi-src.github.io/unified-runtime/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oneapi-src.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.TXT","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-27T21:07:05.000Z","updated_at":"2024-10-29T10:38:50.000Z","dependencies_parsed_at":"2024-01-20T00:22:27.884Z","dependency_job_id":"2d96ade6-c2f3-4d83-bec6-ffc33a999f5a","html_url":"https://github.com/oneapi-src/unified-runtime","commit_stats":null,"previous_names":[],"tags_count":151,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneapi-src%2Funified-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneapi-src%2Funified-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneapi-src%2Funified-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oneapi-src%2Funified-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oneapi-src","download_url":"https://codeload.github.com/oneapi-src/unified-runtime/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247174418,"owners_count":20896078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T04:19:32.978Z","updated_at":"2025-04-04T12:07:50.374Z","avatar_url":"https://github.com/oneapi-src.png","language":"C++","readme":"# Unified Runtime\n\n[![Deploy documentation to Pages](https://github.com/oneapi-src/unified-runtime/actions/workflows/docs.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/docs.yml)\n[![Compute Benchmarks Nightly](https://github.com/oneapi-src/unified-runtime/actions/workflows/benchmarks-nightly.yml/badge.svg)](https://github.com/oneapi-src/unified-runtime/actions/workflows/benchmarks-nightly.yml)\n[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/oneapi-src/unified-runtime/badge)](https://securityscorecards.dev/viewer/?uri=github.com/oneapi-src/unified-runtime)\n\n\u003c!-- TODO: add general description and purpose of the project --\u003e\n\n## Table of contents\n\n- [Unified Runtime](#unified-runtime)\n  - [Table of contents](#table-of-contents)\n  - [Contents of the repo](#contents-of-the-repo)\n  - [Integration](#integration)\n    - [Weekly tags](#weekly-tags)\n  - [Third-Party tools](#third-party-tools)\n  - [Building](#building)\n    - [Requirements](#requirements)\n    - [Windows](#windows)\n    - [Linux](#linux)\n    - [CMake standard options](#cmake-standard-options)\n    - [Additional make targets](#additional-make-targets)\n  - [Contributions](#contributions)\n    - [Adapter naming convention](#adapter-naming-convention)\n    - [Source code generation](#source-code-generation)\n    - [Documentation](#documentation)\n  - [Release Process](#release-process)\n\n## Contents of the project\n\nThis project contains the following:\n\n- API specification in YaML\n- API programming guide in RST\n- Loader and a null adapter implementation (partially generated)\n- Example applications\n- API C/C++ header files (generated)\n- API Python module (generated)\n- Sample C++ wrapper (generated)\n- Sample C/C++ import library (generated)\n\n## Integration\n\nThe recommended way to integrate this project into another is via CMake's\n[FetchContent](https://cmake.org/cmake/help/latest/module/FetchContent.html),\nfor example:\n\n```cmake\ninclude(FetchContent)\n\nFetchContent_Declare(\n    unified-runtime\n    GIT_REPOSITORY https://github.com/oneapi-src/unified-runtime.git\n    GIT_TAG main  # This will pull the latest changes from the main branch.\n)\nFetchContent_MakeAvailable(unified-runtime)\n\nadd_executable(example example.cpp)\ntarget_link_libraries(example PUBLIC unified-runtime::headers)\n```\n\n## Third-Party tools\n\nThe recommended method to install the third-party tools is using a Python\nvirtual environment, for example:\n\n```bash\n$ python -m venv .venv\n$ source .venv/bin/activate\n$ pip install -r third_party/requirements.txt\n```\n\n## Building\n\nThe requirements and instructions below are for building the project from source\nwithout any modifications. To make modifications to the specification, please\nsee the\n[Contribution Guide](https://oneapi-src.github.io/unified-runtime/core/CONTRIB.html)\nfor more detailed instructions on the correct setup.\n\n### Requirements\n\nRequired packages:\n- C++ compiler with C++17 support\n- [CMake](https://cmake.org/) \u003e= 3.20.0\n- Python v3.6.6 or later\n\n### Windows\n\nGenerating Visual Studio Project. EXE and binaries will be in **build/bin/{build_config}**\n\n```bash\n$ mkdir build\n$ cd build\n$ cmake {path_to_source_dir} -G \"Visual Studio 15 2017 Win64\"\n```\n\n### Linux\n\nExecutable and binaries will be in **build/bin**\n\n```bash\n$ mkdir build\n$ cd build\n$ cmake {path_to_source_dir}\n$ make\n```\n\n### CMake standard options\n\nList of options provided by CMake:\n\n| Name | Description | Values | Default |\n| - | - | - | - |\n| UR_BUILD_EXAMPLES | Build example applications | ON/OFF | ON |\n| UR_BUILD_TESTS | Build the tests | ON/OFF | ON |\n| UR_BUILD_TOOLS | Build tools | ON/OFF | ON |\n| UR_FORMAT_CPP_STYLE | Format code style | ON/OFF | OFF |\n| UR_DEVELOPER_MODE | Treat warnings as errors | ON/OFF | OFF |\n| UR_ENABLE_FAST_SPEC_MODE | Enable fast specification generation mode | ON/OFF | OFF |\n| UR_USE_ASAN | Enable AddressSanitizer | ON/OFF | OFF |\n| UR_USE_TSAN | Enable ThreadSanitizer | ON/OFF | OFF |\n| UR_USE_UBSAN | Enable UndefinedBehavior Sanitizer | ON/OFF | OFF |\n| UR_USE_MSAN | Enable MemorySanitizer (clang only) | ON/OFF | OFF |\n| UR_USE_CFI | Enable Control Flow Integrity checks (clang only, also enables lto) | ON/OFF | OFF |\n| UR_ENABLE_TRACING | Enable XPTI-based tracing layer | ON/OFF | OFF |\n| UR_ENABLE_SANITIZER | Enable device sanitizer layer | ON/OFF | ON |\n| UR_CONFORMANCE_TARGET_TRIPLES | SYCL triples to build CTS device binaries for | Comma-separated list | spir64 |\n| UR_CONFORMANCE_AMD_ARCH | AMD device target ID to build CTS binaries for | string | `\"\"` |\n| UR_CONFORMANCE_ENABLE_MATCH_FILES | Enable CTS match files | ON/OFF | ON |\n| UR_CONFORMANCE_TEST_LOADER | Additionally build and run \"loader\" tests for the CTS | ON/OFF | OFF |\n| UR_BUILD_ADAPTER_L0     | Build the Level-Zero adapter            | ON/OFF     | OFF     |\n| UR_BUILD_ADAPTER_OPENCL | Build the OpenCL adapter                | ON/OFF     | OFF     |\n| UR_BUILD_ADAPTER_CUDA   | Build the CUDA adapter                  | ON/OFF     | OFF     |\n| UR_BUILD_ADAPTER_HIP    | Build the HIP adapter                   | ON/OFF     | OFF     |\n| UR_BUILD_ADAPTER_NATIVE_CPU | Build the Native-CPU adapter        | ON/OFF     | OFF     |\n| UR_BUILD_ADAPTER_ALL    | Build all currently supported adapters  | ON/OFF     | OFF     |\n| UR_BUILD_ADAPTER_L0_V2    | Build the (experimental) Level-Zero v2 adapter  | ON/OFF     | OFF     |\n| UR_STATIC_ADAPTER_L0    | Build the Level-Zero adapter as static and embed in the loader | ON/OFF   | OFF |\n| UR_HIP_PLATFORM         | Build HIP adapter for AMD or NVIDIA platform           | AMD/NVIDIA | AMD     |\n| UR_ENABLE_COMGR         | Enable comgr lib usage           | AMD/NVIDIA | AMD     |\n| UR_DPCXX | Path of the DPC++ compiler executable to build device binaries for testing | File path | `\"\"` |\n| UR_DEVICE_CODE_EXTRACTOR | Path of the `clang-offload-extract` executable from the DPC++ package, required for CTS device binaries | File path | `\"${dirname(UR_DPCXX)}/clang-offload-extract\"` |\n| UR_DPCXX_BUILD_FLAGS | Build flags to pass to DPC++ when compiling device programs | Space-separated options list | `\"\"` |\n| UR_SYCL_LIBRARY_DIR | Path of the SYCL runtime library directory to build CTS device binaries | Directory path | `\"\"` |\n| UR_HIP_ROCM_DIR | Path of the default ROCm HIP installation | Directory path | `$ENV{ROCM_PATH}` or `/opt/rocm` |\n| UR_HIP_INCLUDE_DIR | Path of the ROCm HIP include directory | Directory path | `${UR_HIP_ROCM_DIR}/include` |\n| UR_HIP_HSA_INCLUDE_DIRS | Path of the ROCm HSA include directory | Directory path | `${UR_HIP_ROCM_DIR}/hsa/include;${UR_HIP_ROCM_DIR}/include` |\n| UR_HIP_LIB_DIR | Path of the ROCm HIP library directory | Directory path | `${UR_HIP_ROCM_DIR}/lib` |\n\n### Additional make targets\n\nTo run tests, do the following:\n\n```bash\n$ make\n$ make test\n```\n\nTo run automated code formatting, configure CMake with `UR_FORMAT_CPP_STYLE` option\nand then run a custom `cppformat` target:\n\n```bash\n$ make cppformat\n```\n\nIf you've made modifications to the specification, you can also run\na custom `generate` target prior to building.\nIt will generate the source code **and** run automated code formatting:\n\n```bash\n$ make generate\n```\n\nThis target has additional dependencies which are described in the *Build\nEnvironment* section of the\n[Contribution Guide](https://oneapi-src.github.io/unified-runtime/core/CONTRIB.html).\n\n## Contributions\n\nFor those who intend to make a contribution to the project please read our\n[Contribution Guide](https://oneapi-src.github.io/unified-runtime/core/CONTRIB.html)\nfor more information.\n\n### Adapter naming convention\n\nTo maintain consistency and clarity in naming adapter libraries, it is recommended\nto use the following naming convention:\n\n* On Linux platforms, use `libur_adapter_[name].so`.\n* On Windows platforms, use `ur_adapter_[name].dll`.\n\n### Source code generation\n\nCode is generated using included [Python scripts](/scripts/README.md).\n\n### Documentation\n\nDocumentation is generated from source code using Sphinx -\nsee [scripts dir](/scripts/README.md) for details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneapi-src%2Funified-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foneapi-src%2Funified-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneapi-src%2Funified-runtime/lists"}