Skip to content
Merged
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
5 changes: 5 additions & 0 deletions fastsafetensors/cpp/ext.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,12 @@ typedef struct CUfileError { CUfileOpError err; } CUfileError_t;
// Define minimal CUDA/HIP types for both platforms to avoid compile-time dependencies
// We load all GPU functions dynamically at runtime via dlopen()
typedef enum cudaError { cudaSuccess = 0, cudaErrorMemoryAllocation = 2 } cudaError_t;
// Platform-specific enum values - CUDA and HIP have different values for HostToDevice
#ifdef USE_ROCM
enum cudaMemcpyKind { cudaMemcpyHostToDevice=1, cudaMemcpyDefault = 4 };
#else
enum cudaMemcpyKind { cudaMemcpyHostToDevice=2, cudaMemcpyDefault = 4 };
#endif


typedef enum CUfileFeatureFlags {
Expand Down