Add support for AMD GPU#798
Open
pxl-th wants to merge 3 commits intonerfstudio-project:mainfrom
Open
Conversation
|
how is the performance comparied to Nvidia RTX card, like 4090? |
|
https://github.com/Spacefish/gsplat-rdna/tree/rocm_7_2 haha did the same thing but on AMDs fork of gsplat. Performance is ok, i guess 8x8 is impacted a littlebit as we have to use shared memory to accumulate 2 32 wide warps but other sizes are fine / work on 32 wide waves like a charm. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces AMD GPU support for gsplat.
Tested on:
Tested and confirmed working:
Relies on:
Closes #771.
Closes #434.
cuda/directory to avoid hipifying it, which causes confusion during compilation.cg::labeled_partition, simply avoid warp reductions on it and just do global memory writes directly. To reduce code duplication, introduceFOR_HIPvariable that we use to determine whether to use labeled partition or just a placeholder to avoid compilation errors, e.g.:and in places where we'd do only one global atomic add (which should eliminate branching altogether):
std::array.atwith[]indexing to avoid bounds-checking which causes errors:cg::reduce, create equivalentwarpSumreduction methods usingshfl_downintrinsic & use it where we do reduction on the whole warp (i.e.tiled_partitiionin our case).-munsafe-fp-atomicsis required to replace CAS-loop with fast hardware floating-point atomics that significantly improves the performance on AMD GPU.