{"id":18408813,"url":"https://github.com/codeplaysoftware/sycl-for-cuda-examples","last_synced_at":"2025-04-07T05:13:31.115Z","repository":{"id":40644297,"uuid":"240494917","full_name":"codeplaysoftware/SYCL-For-CUDA-Examples","owner":"codeplaysoftware","description":"Examples for using SYCL on CUDA","archived":false,"fork":false,"pushed_at":"2025-03-01T20:29:24.000Z","size":183,"stargazers_count":62,"open_issues_count":2,"forks_count":25,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-31T04:06:15.594Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codeplaysoftware.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"Contributing.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-14T11:37:51.000Z","updated_at":"2025-03-05T15:10:46.000Z","dependencies_parsed_at":"2024-08-14T17:44:25.045Z","dependency_job_id":"d9be9a51-f0f5-40e3-a2f7-0826dcc5bbe7","html_url":"https://github.com/codeplaysoftware/SYCL-For-CUDA-Examples","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplaysoftware%2FSYCL-For-CUDA-Examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplaysoftware%2FSYCL-For-CUDA-Examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplaysoftware%2FSYCL-For-CUDA-Examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codeplaysoftware%2FSYCL-For-CUDA-Examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codeplaysoftware","download_url":"https://codeload.github.com/codeplaysoftware/SYCL-For-CUDA-Examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247595335,"owners_count":20963943,"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-06T03:21:35.735Z","updated_at":"2025-04-07T05:13:31.097Z","avatar_url":"https://github.com/codeplaysoftware.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"SYCL for CUDA examples\n==========================\n\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/codeplaysoftware/SYCL-For-CUDA-Examples/badge)](https://scorecard.dev/viewer/?uri=github.com/codeplaysoftware/SYCL-For-CUDA-Examples)\n\nThis repository contains examples that demonstrate how to use the CUDA backend\nin SYCL.\n\nThe examples are built and test in Linux with GCC 7.4, NVCC 10.1 and the\nexperimental support for CUDA in the DPC++ SYCL implementation.\n\nCUDA is a registered trademark of NVIDIA Corporation\nSYCL is a trademark of the Khronos Group Inc.\n\nPrerequisites\n-------------\n\nThese examples are intended to be used with this [docker image](https://hub.docker.com/r/ruyman/dpcpp_cuda_examples). \nIt provides all the examples, libraries and the required environment variables. \n\n[NVIDIA Container Toolkit](https://github.com/NVIDIA/nvidia-docker) must be installed to run the image.\n\nA useful guide for setting up docker and the NVIDIA Container Toolkit can be found [here](https://www.pugetsystems.com/labs/hpc/Workstation-Setup-for-Docker-with-the-New-NVIDIA-Container-Toolkit-nvidia-docker2-is-deprecated-1568).\n\nGetting Started\n-------------\n\nOnce docker and the NVIDIA Container Toolkit are installed, we can create a new container and run the examples witin it.\n\n``` sh\n$ sudo docker run --gpus all -it ruyman/dpcpp_cuda_examples\n```\n\nOnce inside the docker image, navigate to `/home/examples/` to find a local clone of this repo. Make sure to pull the latest changes:\n\n``` sh\n$ cd /home/examples/SYCL-For-CUDA-Examples\n$ git pull\n```\n\nRefer to each example and/or exercise for detailed instructions on how  to run it.\n\nExamples\n=========\n\n[Vector Addition](examples/vector_addition)\n--------------------------------------------\n\nThis trivial example can be used to compare a simple vector addition in CUDA to\nan equivalent implementation in SYCL for CUDA. The aim of the example is also \nto highlight how to build an application with SYCL for CUDA using DPC++ support, \nfor which an example CMakefile is provided.\n\n[Fortran Interface](examples/fortran_interface)\n--------------------------------------------\n\nThis demonstrates an example of how to call a SYCL function from a CUDA fortran code.\n\n[MPI](examples/MPI)\n--------------------------------------------\n\nThis example shows how to integrate MPI calls within the SYCL DAG using Host Tasks for integration.\n\n\n[SGEMM Interop](examples/sgemm_interop)\n--------------------------\n\nThis demonstrates using SYCL's `host_task` for CUDA interoperability, calling CUBLAS's SGEMM routine for matrix multiplication.\n\n[Distributed (MPI) GEMM](examples/distrib_batch_gemm)\n--------------------------------------------\n\nThis example combines the MPI and SGEMM Interop examples to distribute a matrix multiplication problem between MPI ranks.\n\n[Kokkos](examples/kokkos)\n--------------------------------------------\n\n[Kokkos](https://github.com/kokkos/kokkos) is a middle-layer for scientific computing which features a SYCL backend. This example \nshows a small Kokkos test case (vector-matrix-vector multiplication), adapted from a test case in the Kokkos repo; \nthere is no SYCL code in the example, but it includes scripts to build Kokkos with SYCL support.\n\n[Hashing Algorithms](examples/hashing)\n--------------------------------------------\n\nThis example is slightly different - it benchmarks a series of hashing algorithms.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeplaysoftware%2Fsycl-for-cuda-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodeplaysoftware%2Fsycl-for-cuda-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodeplaysoftware%2Fsycl-for-cuda-examples/lists"}