We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1de5f13 commit d6f998aCopy full SHA for d6f998a
fastsafetensors/cpp/ext.hpp
@@ -39,7 +39,12 @@ typedef struct CUfileError { CUfileOpError err; } CUfileError_t;
39
// Define minimal CUDA/HIP types for both platforms to avoid compile-time dependencies
40
// We load all GPU functions dynamically at runtime via dlopen()
41
typedef enum cudaError { cudaSuccess = 0, cudaErrorMemoryAllocation = 2 } cudaError_t;
42
+// Platform-specific enum values - CUDA and HIP have different values for HostToDevice
43
+#ifdef USE_ROCM
44
+enum cudaMemcpyKind { cudaMemcpyHostToDevice=1, cudaMemcpyDefault = 4 };
45
+#else
46
enum cudaMemcpyKind { cudaMemcpyHostToDevice=2, cudaMemcpyDefault = 4 };
47
+#endif
48
49
50
typedef enum CUfileFeatureFlags {
0 commit comments