Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[gui] GGUI 1/n: Add necessary cuda structs/enums/functions #2645

Merged
merged 1 commit into from
Aug 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions taichi/backends/cuda/cuda_driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <mutex>

#include "taichi/system/dynamic_loader.h"
#include "taichi/backends/cuda/cuda_types.h"

#if (0)
// Turn on to check for comptability
Expand Down
9 changes: 9 additions & 0 deletions taichi/backends/cuda/cuda_driver_functions.inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,13 @@ PER_CUDA_FUNCTION(event_record, cuEventRecord, void *, void *)
PER_CUDA_FUNCTION(event_synchronize, cuEventSynchronize, void *);
PER_CUDA_FUNCTION(event_elapsed_time, cuEventElapsedTime, float *, void *, void *);

// Vulkan interop
PER_CUDA_FUNCTION(import_external_memory, cuImportExternalMemory, CUexternalMemory*, CUDA_EXTERNAL_MEMORY_HANDLE_DESC*)
PER_CUDA_FUNCTION(external_memory_get_mapped_buffer,cuExternalMemoryGetMappedBuffer,CUdeviceptr *, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_BUFFER_DESC *)
PER_CUDA_FUNCTION(external_memory_get_mapped_mipmapped_array,cuExternalMemoryGetMappedMipmappedArray,CUmipmappedArray *, CUexternalMemory, const CUDA_EXTERNAL_MEMORY_MIPMAPPED_ARRAY_DESC *)
PER_CUDA_FUNCTION(mipmapped_array_get_level,cuMipmappedArrayGetLevel,CUarray *, CUmipmappedArray, unsigned int)
PER_CUDA_FUNCTION(surf_object_create,cuSurfObjectCreate,CUsurfObject *, const CUDA_RESOURCE_DESC *)
PER_CUDA_FUNCTION(signal_external_semaphore_async,cuSignalExternalSemaphoresAsync,const CUexternalSemaphore * , const CUDA_EXTERNAL_SEMAPHORE_SIGNAL_PARAMS * , unsigned int , CUstream)
PER_CUDA_FUNCTION(wait_external_semaphore_async,cuWaitExternalSemaphoresAsync,const CUexternalSemaphore * , const CUDA_EXTERNAL_SEMAPHORE_WAIT_PARAMS * , unsigned int , CUstream)
PER_CUDA_FUNCTION(import_external_semaphore, cuImportExternalSemaphore,CUexternalSemaphore * , const CUDA_EXTERNAL_SEMAPHORE_HANDLE_DESC *)
// clang-format on
Loading