{"id":20882622,"url":"https://github.com/snektron/zig-spirv-test-executor","last_synced_at":"2025-05-12T18:31:01.680Z","repository":{"id":89027153,"uuid":"570308628","full_name":"Snektron/zig-spirv-test-executor","owner":"Snektron","description":"Zig SPIR-V testing utility","archived":false,"fork":false,"pushed_at":"2024-04-13T21:46:58.000Z","size":125,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T02:29:28.315Z","etag":null,"topics":["opencl","spirv","zig"],"latest_commit_sha":null,"homepage":"","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Snektron.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-11-24T21:26:22.000Z","updated_at":"2024-04-22T13:57:53.758Z","dependencies_parsed_at":"2024-02-11T10:23:07.695Z","dependency_job_id":"f8eb0b60-6882-4dbb-8a85-96fbb749bbd6","html_url":"https://github.com/Snektron/zig-spirv-test-executor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snektron%2Fzig-spirv-test-executor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snektron%2Fzig-spirv-test-executor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snektron%2Fzig-spirv-test-executor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Snektron%2Fzig-spirv-test-executor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Snektron","download_url":"https://codeload.github.com/Snektron/zig-spirv-test-executor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253797957,"owners_count":21965982,"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":["opencl","spirv","zig"],"created_at":"2024-11-18T07:32:43.162Z","updated_at":"2025-05-12T18:31:01.377Z","avatar_url":"https://github.com/Snektron.png","language":"Zig","readme":"# Zig SPIR-V Test Executor\n\nThis is a program to run Zig tests for the SPIR-V target. This is currently mainly used for the compiler behavior tests, and only supports the OpenCL environment. A SPIR-V-capable OpenCL implementation is required, such as Rusticl, POCL, or Intels\n\n## Building\n\nIn order to build the executor, we need a few system dependencies:\n- The [OpenCL Headers](https://github.com/KhronosGroup/OpenCL-Headers)\n- An OpenCL implementation. Its usually the best to link against an ICD loader so that the actual backend that is used may be swapped out at runtime, such as the [Khronos OpenCL ICD Loader](https://github.com/KhronosGroup/OpenCL-ICD-Loader).\n- [SPIRV-Tools](https://github.com/KhronosGroup/SPIRV-Tools) is required for extra validation of the module.\n\nAfter obtaining these dependencies, simply run `zig build` to build the project.\n\n## Running tests\n\nTo actually run tests, use something like the following:\n```\n$ zig test src/test_kernel.zig \\\n    --test-runner src/test_runner.zig \\\n    -target spirv64-opencl-gnu \\\n    -mcpu generic+Int64+Int16+Int8+Float64+Float16 \\\n    -fno-llvm \\\n    --test-cmd zig-out/bin/zig-spirv-test-executor \\\n    --test-cmd --platform \\\n    --test-cmd Intel \\\n    --test-cmd-bin\n```\n\n## Flake\n\nThe devshell in `flake.nix` sets up an environment with a bunch of OpenCL capable drivers, such as a slim debug build of recent Mesa, Intel's CPU OpenCL runtime, and POCL 5.0.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnektron%2Fzig-spirv-test-executor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsnektron%2Fzig-spirv-test-executor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsnektron%2Fzig-spirv-test-executor/lists"}