Skip to content

Conversation

ramenguy99
Copy link

@ramenguy99 ramenguy99 commented Mar 23, 2025

Category

  • New feature
  • Bugfix
  • Breaking change
  • Refactoring
  • Documentation
  • Other (please explain)

Description

Hi, this PR adds support for the External Resource Interoperability API for interoperability between Cuda and other graphics APIs such as Vulkan, D3D12 and D3D11.

PR is functional and tested on windows with Vulkan, some docs are missing and some cleanup might be needed. If there is interest in merging something like this I am more than happy to complete this.

~ Dario

Changelog

  • Expose External Resource Interoperability API through ExternalSemaphore and ExternalMemoryBuffer

Before your PR is "Ready for review"

  • All commits are signed-off to indicate that your contribution
    adheres to the Developer Certificate of Origin requirements
  • Necessary tests have been added
  • Documentation is up-to-date
  • Auto-generated files modified by compiling Warp and building the documentation have been updated (e.g. stubs.py, functions.rst)
  • Code passes formatting and linting checks with pre-commit run -a

Signed-off-by: Dario Mylonopoulos <[email protected]>
@ramenguy99 ramenguy99 force-pushed the external-resource-interop branch from c37f1c6 to 37b82e8 Compare March 23, 2025 21:08
@shi-eric shi-eric requested a review from nvlukasz March 23, 2025 21:17
@ramenguy99 ramenguy99 marked this pull request as draft March 23, 2025 21:41
@shi-eric
Copy link
Contributor

I think @nvlukasz will be back next week. Will remind him to take a look.

@nvlukasz
Copy link
Contributor

nvlukasz commented Apr 2, 2025

Thanks @ramenguy99, this looks like a potentially useful contribution.

My main concern is that I'm not aware of any immediate use for it, so we don't have good test cases or usage examples.

Can you share more information about how you are using this functionality?

@ramenguy99
Copy link
Author

ramenguy99 commented Apr 3, 2025

Hi, I'm currently using this with a Vulkan rendering library that has python bindings and can expose buffers / semaphores for interop with warp. This library is a personal project and is not currently open source, although I plan to release it at some point (hopefully in a few months).
I also see a possibility to test this with something like slangpy in the future. But I don't think interop is exposed at the moment, especially due to the added complexity of being built on top of an RHI.

I agree that it does not make a lot of sense to merge this without immediate users, tests or examples. I can reopen this in the future once there is an easy way to integrate it.

@ManosAgelidis
Copy link

@nvlukasz If I may add a point to the discussion, we are also looking into integrating warp into UE5. Currently there is a lot of overhead due to costly UE5 rendering thread->UE CPU->warp python->warp CUDA->warp python->UE5 CPU->UE5 rendering thread data transfers taking place. This is due to the fact that we want to update the vertices of meshes in UE5 (which already live on the GPU) through warp and there is currently no interop between UE5's rendering thread and warp. Not sure what this PR does but the feature itself could be quite useful.

@shi-eric shi-eric added the interop Interoperability of Warp with other libraries label May 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

interop Interoperability of Warp with other libraries

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants