{"id":18782056,"url":"https://github.com/gpuopen-librariesandsdks/hiprtsdk","last_synced_at":"2025-04-09T17:23:10.064Z","repository":{"id":47957304,"uuid":"481271770","full_name":"GPUOpen-LibrariesAndSDKs/HIPRTSDK","owner":"GPUOpen-LibrariesAndSDKs","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-12T10:34:45.000Z","size":7540,"stargazers_count":61,"open_issues_count":4,"forks_count":9,"subscribers_count":8,"default_branch":"main","last_synced_at":"2025-04-02T11:49:51.978Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/GPUOpen-LibrariesAndSDKs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"publiccode":null,"codemeta":null}},"created_at":"2022-04-13T15:28:25.000Z","updated_at":"2025-02-24T02:05:13.000Z","dependencies_parsed_at":"2023-01-18T15:45:50.868Z","dependency_job_id":"f33e8851-0abd-4691-b67c-a7f9d742df9f","html_url":"https://github.com/GPUOpen-LibrariesAndSDKs/HIPRTSDK","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FHIPRTSDK","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FHIPRTSDK/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FHIPRTSDK/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GPUOpen-LibrariesAndSDKs%2FHIPRTSDK/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GPUOpen-LibrariesAndSDKs","download_url":"https://codeload.github.com/GPUOpen-LibrariesAndSDKs/HIPRTSDK/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248075323,"owners_count":21043563,"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-07T20:34:40.203Z","updated_at":"2025-04-09T17:23:10.042Z","avatar_url":"https://github.com/GPUOpen-LibrariesAndSDKs.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HIP RT SDK\n\n**This repository is only for tutorials. The SDK binaries needs to be downloaded from [HIP RT project page](https://gpuopen.com/hiprt/) and the full source code of HIP RT can be found [here](https://github.com/GPUOpen-LibrariesAndSDKs/HIPRT).**\n\nHIP RT is a ray tracing library in HIP. The APIs are designed to be minimal and low level, making it easy to write a ray tracing application in HIP. We designed the library and APIs to be simple to use and integrate into any existing HIP applications. Although there are a few other ray tracing APIs which, we designed HIP RT to be simpler and easier to use, so you do not need to learn many new kernel types. \n\n## Features\n\n- Ray-triangle intersection\n- Ray-custom primitive intersection\n- Ray mask to filter geometries\n- Several bounding volume hierarchy (BVH) options\n- Offline BVH load and store\n- BVH import\n- Motion blur\n\n## Requirement\n\nHIP RT runs on AMD and NVIDIA® GPUs. HIP and CUDA® APIs are dynamically loaded so you do not need to have these SDKs if your have these DLLs installed with the driver package. Hardware-accelerated ray tracing only works on RDNA™ 2 GPUs (Radeon™ RX 6000 series or newer).\n\nThe supported AMD GPU architecture families are:\n\n- Navi3x (Radeon™ RX 7000 series)\n- Navi2x (Radeon™ RX 6000 series)\n- Navi1x (Radeon™ RX 5000 series)\n\nYou will also need AMD Software: Adrenalin Edition 23.30 or later for Windows and ROCm 5.7 for Linux.\n\n----\n\n\n## Directories\n\n- [hiprt](hiprt)\n  - The header and the library which you need to download from [HIP RT project page](https://gpuopen.com/hiprt/). \n- [tutorials](tutorials)\n  - Tutorial source code\n- [contrib](contrib)\n  - External dependencies\n\n\n## Building the tutorials\n\n1. First you need to clone the repository, then init and update the submodules if you didn't clone with `--recursive`:\n\n````\ngit submodule init\ngit submodule update\n````\n2. Download the HIP RT SDK from [HIP RT prject page](https://gpuopen.com/hiprt/), copy the 'hiprt' directory as explained [here](./hiprt/README.md).\n\n### Windows:\n3. Run premake to generate a solution for Visual Studio 2022:\n````\ncd tutorials\n\"../tools/premake5/win/premake5.exe\" vs2022\n````\n\n4. Open the solution, compile \u0026 run.\n\n### Linux:\n3. Run premake like this on Linux, which will generate a make file:\n````\ncd tutorials\n../tools/premake5/linux64/premake5 gmake2\n````\n\n4. Compile using the make file \u0026 run.\n````\ncd build\nmake\n````\n\nThese tutorials are made to run on both AMD and NVIDIA by specifying the device index. \n\n## Introduction to the HIP RT APIs\n\nThe minimum example can be found at [tutorials/00_context_creation/main.cpp](tutorials/00_context_creation/main.cpp). On AMD platforms, you need to create a HIP context and device to initialize `hiprt` using `hiprtCreateContext` by passing `hiprtContextCreationInput` object where you need to set the native API context, device, and device type (HIP or CUDA). \n\nAfter that, use `hiprtCreateGeometry` and `hiprtBuildGeometry` to create `hiprtGeometry`. Once you have finished setting up objects on the host side, you can pass the context object to your kernel. \n\nAn example of a minimum kernel can be found at [here](tutorials/01_geom_intersection/TestKernel.h). This is a simple HIP kernel that we are passing `hiprtGeometry ` to. To perform an intersection test, simply fill in `hiprtRay`, then create a `hiprtGeomTraversalClosest` object, then call `getNextHit()`. It is that simple.\n\n## References \n- Introducing HIP RT – a ray tracing library in HIP, [GPUOpen Blog](https://gpuopen.com/learn/introducing-hiprt/)\n- HIP Ray Tracing 2.0 introduces improved custom function handling, Bitcode linking, and more, [GPUOpen Blog](https://gpuopen.com/learn/hiprt-v2-release-optimizations-and-updates/)\n- Introducing HIP RT v2.1 - batch construction for small geometries, transformation query functions, and more, [GPUOpen Blog](https://gpuopen.com/learn/hiprt_2_1_batch_construction_transformation_functions/)\n- Introducing HIP RT v2.2, [GPUOpen Blog](https://gpuopen.com/learn/introducing-hip-rt-v2-2/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpuopen-librariesandsdks%2Fhiprtsdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgpuopen-librariesandsdks%2Fhiprtsdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgpuopen-librariesandsdks%2Fhiprtsdk/lists"}