warp-lang 1.8.1__py3-none-macosx_10_13_universal2.whl → 1.9.1__py3-none-macosx_10_13_universal2.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of warp-lang might be problematic. Click here for more details.

Files changed (141) hide show
  1. warp/__init__.py +282 -103
  2. warp/__init__.pyi +1904 -114
  3. warp/bin/libwarp-clang.dylib +0 -0
  4. warp/bin/libwarp.dylib +0 -0
  5. warp/build.py +93 -30
  6. warp/build_dll.py +331 -101
  7. warp/builtins.py +1244 -160
  8. warp/codegen.py +317 -206
  9. warp/config.py +1 -1
  10. warp/context.py +1465 -789
  11. warp/examples/core/example_marching_cubes.py +1 -0
  12. warp/examples/core/example_render_opengl.py +100 -3
  13. warp/examples/fem/example_apic_fluid.py +98 -52
  14. warp/examples/fem/example_convection_diffusion_dg.py +25 -4
  15. warp/examples/fem/example_diffusion_mgpu.py +8 -3
  16. warp/examples/fem/utils.py +68 -22
  17. warp/examples/interop/example_jax_kernel.py +2 -1
  18. warp/fabric.py +1 -1
  19. warp/fem/cache.py +27 -19
  20. warp/fem/domain.py +2 -2
  21. warp/fem/field/nodal_field.py +2 -2
  22. warp/fem/field/virtual.py +264 -166
  23. warp/fem/geometry/geometry.py +5 -5
  24. warp/fem/integrate.py +129 -51
  25. warp/fem/space/restriction.py +4 -0
  26. warp/fem/space/shape/tet_shape_function.py +3 -10
  27. warp/jax_experimental/custom_call.py +25 -2
  28. warp/jax_experimental/ffi.py +22 -1
  29. warp/jax_experimental/xla_ffi.py +16 -7
  30. warp/marching_cubes.py +708 -0
  31. warp/native/array.h +99 -4
  32. warp/native/builtin.h +86 -9
  33. warp/native/bvh.cpp +64 -28
  34. warp/native/bvh.cu +58 -58
  35. warp/native/bvh.h +2 -2
  36. warp/native/clang/clang.cpp +7 -7
  37. warp/native/coloring.cpp +8 -2
  38. warp/native/crt.cpp +2 -2
  39. warp/native/crt.h +3 -5
  40. warp/native/cuda_util.cpp +41 -10
  41. warp/native/cuda_util.h +10 -4
  42. warp/native/exports.h +1842 -1908
  43. warp/native/fabric.h +2 -1
  44. warp/native/hashgrid.cpp +37 -37
  45. warp/native/hashgrid.cu +2 -2
  46. warp/native/initializer_array.h +1 -1
  47. warp/native/intersect.h +2 -2
  48. warp/native/mat.h +1910 -116
  49. warp/native/mathdx.cpp +43 -43
  50. warp/native/mesh.cpp +24 -24
  51. warp/native/mesh.cu +26 -26
  52. warp/native/mesh.h +4 -2
  53. warp/native/nanovdb/GridHandle.h +179 -12
  54. warp/native/nanovdb/HostBuffer.h +8 -7
  55. warp/native/nanovdb/NanoVDB.h +517 -895
  56. warp/native/nanovdb/NodeManager.h +323 -0
  57. warp/native/nanovdb/PNanoVDB.h +2 -2
  58. warp/native/quat.h +331 -14
  59. warp/native/range.h +7 -1
  60. warp/native/reduce.cpp +10 -10
  61. warp/native/reduce.cu +13 -14
  62. warp/native/runlength_encode.cpp +2 -2
  63. warp/native/runlength_encode.cu +5 -5
  64. warp/native/scan.cpp +3 -3
  65. warp/native/scan.cu +4 -4
  66. warp/native/sort.cpp +10 -10
  67. warp/native/sort.cu +40 -31
  68. warp/native/sort.h +2 -0
  69. warp/native/sparse.cpp +8 -8
  70. warp/native/sparse.cu +13 -13
  71. warp/native/spatial.h +366 -17
  72. warp/native/temp_buffer.h +2 -2
  73. warp/native/tile.h +471 -82
  74. warp/native/vec.h +328 -14
  75. warp/native/volume.cpp +54 -54
  76. warp/native/volume.cu +1 -1
  77. warp/native/volume.h +2 -1
  78. warp/native/volume_builder.cu +30 -37
  79. warp/native/warp.cpp +150 -149
  80. warp/native/warp.cu +377 -216
  81. warp/native/warp.h +227 -226
  82. warp/optim/linear.py +736 -271
  83. warp/render/imgui_manager.py +289 -0
  84. warp/render/render_opengl.py +99 -18
  85. warp/render/render_usd.py +1 -0
  86. warp/sim/graph_coloring.py +2 -2
  87. warp/sparse.py +558 -175
  88. warp/tests/aux_test_module_aot.py +7 -0
  89. warp/tests/cuda/test_async.py +3 -3
  90. warp/tests/cuda/test_conditional_captures.py +101 -0
  91. warp/tests/geometry/test_hash_grid.py +38 -0
  92. warp/tests/geometry/test_marching_cubes.py +233 -12
  93. warp/tests/interop/test_jax.py +608 -28
  94. warp/tests/sim/test_coloring.py +6 -6
  95. warp/tests/test_array.py +58 -5
  96. warp/tests/test_codegen.py +4 -3
  97. warp/tests/test_context.py +8 -15
  98. warp/tests/test_enum.py +136 -0
  99. warp/tests/test_examples.py +2 -2
  100. warp/tests/test_fem.py +49 -6
  101. warp/tests/test_fixedarray.py +229 -0
  102. warp/tests/test_func.py +18 -15
  103. warp/tests/test_future_annotations.py +7 -5
  104. warp/tests/test_linear_solvers.py +30 -0
  105. warp/tests/test_map.py +15 -1
  106. warp/tests/test_mat.py +1518 -378
  107. warp/tests/test_mat_assign_copy.py +178 -0
  108. warp/tests/test_mat_constructors.py +574 -0
  109. warp/tests/test_module_aot.py +287 -0
  110. warp/tests/test_print.py +69 -0
  111. warp/tests/test_quat.py +140 -34
  112. warp/tests/test_quat_assign_copy.py +145 -0
  113. warp/tests/test_reload.py +2 -1
  114. warp/tests/test_sparse.py +71 -0
  115. warp/tests/test_spatial.py +140 -34
  116. warp/tests/test_spatial_assign_copy.py +160 -0
  117. warp/tests/test_struct.py +43 -3
  118. warp/tests/test_tuple.py +96 -0
  119. warp/tests/test_types.py +61 -20
  120. warp/tests/test_vec.py +179 -34
  121. warp/tests/test_vec_assign_copy.py +143 -0
  122. warp/tests/tile/test_tile.py +245 -18
  123. warp/tests/tile/test_tile_cholesky.py +605 -0
  124. warp/tests/tile/test_tile_load.py +169 -0
  125. warp/tests/tile/test_tile_mathdx.py +2 -558
  126. warp/tests/tile/test_tile_matmul.py +1 -1
  127. warp/tests/tile/test_tile_mlp.py +1 -1
  128. warp/tests/tile/test_tile_shared_memory.py +5 -5
  129. warp/tests/unittest_suites.py +6 -0
  130. warp/tests/walkthrough_debug.py +1 -1
  131. warp/thirdparty/unittest_parallel.py +108 -9
  132. warp/types.py +571 -267
  133. warp/utils.py +68 -86
  134. {warp_lang-1.8.1.dist-info → warp_lang-1.9.1.dist-info}/METADATA +29 -69
  135. {warp_lang-1.8.1.dist-info → warp_lang-1.9.1.dist-info}/RECORD +138 -128
  136. warp/native/marching.cpp +0 -19
  137. warp/native/marching.cu +0 -514
  138. warp/native/marching.h +0 -19
  139. {warp_lang-1.8.1.dist-info → warp_lang-1.9.1.dist-info}/WHEEL +0 -0
  140. {warp_lang-1.8.1.dist-info → warp_lang-1.9.1.dist-info}/licenses/LICENSE.md +0 -0
  141. {warp_lang-1.8.1.dist-info → warp_lang-1.9.1.dist-info}/top_level.txt +0 -0
warp/native/warp.cpp CHANGED
@@ -29,7 +29,7 @@
29
29
  #include <malloc.h>
30
30
  #endif
31
31
 
32
- uint16_t float_to_half_bits(float x)
32
+ uint16_t wp_float_to_half_bits(float x)
33
33
  {
34
34
  // adapted from Fabien Giesen's post: https://gist.github.com/rygorous/2156668
35
35
  union fp32
@@ -79,7 +79,7 @@ uint16_t float_to_half_bits(float x)
79
79
  return u;
80
80
  }
81
81
 
82
- float half_bits_to_float(uint16_t u)
82
+ float wp_half_bits_to_float(uint16_t u)
83
83
  {
84
84
  // adapted from Fabien Giesen's post: https://gist.github.com/rygorous/2156668
85
85
  union fp32
@@ -116,7 +116,7 @@ float half_bits_to_float(uint16_t u)
116
116
  return o.f;
117
117
  }
118
118
 
119
- int init()
119
+ int wp_init()
120
120
  {
121
121
  #if WP_ENABLE_CUDA
122
122
  int cuda_init(void);
@@ -127,46 +127,46 @@ int init()
127
127
  return 0;
128
128
  }
129
129
 
130
- void shutdown()
130
+ void wp_shutdown()
131
131
  {
132
132
  }
133
133
 
134
- const char* get_error_string()
134
+ const char* wp_get_error_string()
135
135
  {
136
136
  return wp::get_error_string();
137
137
  }
138
138
 
139
- void set_error_output_enabled(int enable)
139
+ void wp_set_error_output_enabled(int enable)
140
140
  {
141
141
  wp::set_error_output_enabled(bool(enable));
142
142
  }
143
143
 
144
- int is_error_output_enabled()
144
+ int wp_is_error_output_enabled()
145
145
  {
146
146
  return int(wp::is_error_output_enabled());
147
147
  }
148
148
 
149
- int is_cuda_enabled()
149
+ int wp_is_cuda_enabled()
150
150
  {
151
151
  return int(WP_ENABLE_CUDA);
152
152
  }
153
153
 
154
- int is_cuda_compatibility_enabled()
154
+ int wp_is_cuda_compatibility_enabled()
155
155
  {
156
156
  return int(WP_ENABLE_CUDA_COMPATIBILITY);
157
157
  }
158
158
 
159
- int is_mathdx_enabled()
159
+ int wp_is_mathdx_enabled()
160
160
  {
161
161
  return int(WP_ENABLE_MATHDX);
162
162
  }
163
163
 
164
- int is_debug_enabled()
164
+ int wp_is_debug_enabled()
165
165
  {
166
166
  return int(WP_ENABLE_DEBUG);
167
167
  }
168
168
 
169
- void* alloc_host(size_t s)
169
+ void* wp_alloc_host(size_t s)
170
170
  {
171
171
  // increase CPU array alignment for compatibility with other libs, e.g., JAX, XLA, Eigen.
172
172
  size_t alignment = 64;
@@ -183,7 +183,7 @@ void* alloc_host(size_t s)
183
183
  #endif
184
184
  }
185
185
 
186
- void free_host(void* ptr)
186
+ void wp_free_host(void* ptr)
187
187
  {
188
188
  #if defined(_MSC_VER)
189
189
  _aligned_free(ptr);
@@ -192,13 +192,13 @@ void free_host(void* ptr)
192
192
  #endif
193
193
  }
194
194
 
195
- bool memcpy_h2h(void* dest, void* src, size_t n)
195
+ bool wp_memcpy_h2h(void* dest, void* src, size_t n)
196
196
  {
197
197
  memcpy(dest, src, n);
198
198
  return true;
199
199
  }
200
200
 
201
- void memset_host(void* dest, int value, size_t n)
201
+ void wp_memset_host(void* dest, int value, size_t n)
202
202
  {
203
203
  if ((n%4) > 0)
204
204
  {
@@ -221,7 +221,7 @@ void memtile_value_host(T* dst, T value, size_t n)
221
221
  *dst++ = value;
222
222
  }
223
223
 
224
- void memtile_host(void* dst, const void* src, size_t srcsize, size_t n)
224
+ void wp_memtile_host(void* dst, const void* src, size_t srcsize, size_t n)
225
225
  {
226
226
  size_t dst_addr = reinterpret_cast<size_t>(dst);
227
227
  size_t src_addr = reinterpret_cast<size_t>(src);
@@ -246,12 +246,12 @@ void memtile_host(void* dst, const void* src, size_t srcsize, size_t n)
246
246
  }
247
247
  }
248
248
 
249
- void array_scan_int_host(uint64_t in, uint64_t out, int len, bool inclusive)
249
+ void wp_array_scan_int_host(uint64_t in, uint64_t out, int len, bool inclusive)
250
250
  {
251
251
  scan_host((const int*)in, (int*)out, len, inclusive);
252
252
  }
253
253
 
254
- void array_scan_float_host(uint64_t in, uint64_t out, int len, bool inclusive)
254
+ void wp_array_scan_float_host(uint64_t in, uint64_t out, int len, bool inclusive)
255
255
  {
256
256
  scan_host((const float*)in, (float*)out, len, inclusive);
257
257
  }
@@ -595,7 +595,7 @@ static void array_copy_from_fabric_indexed(const wp::indexedfabricarray_t<void>&
595
595
  }
596
596
 
597
597
 
598
- WP_API bool array_copy_host(void* dst, void* src, int dst_type, int src_type, int elem_size)
598
+ WP_API bool wp_array_copy_host(void* dst, void* src, int dst_type, int src_type, int elem_size)
599
599
  {
600
600
  if (!src || !dst)
601
601
  return false;
@@ -864,7 +864,7 @@ static void array_fill_fabric(wp::fabricarray_t<void>& fa, const void* value_ptr
864
864
  {
865
865
  const wp::fabricbucket_t& bucket = fa.buckets[i];
866
866
  size_t bucket_size = bucket.index_end - bucket.index_start;
867
- memtile_host(bucket.ptr, value_ptr, value_size, bucket_size);
867
+ wp_memtile_host(bucket.ptr, value_ptr, value_size, bucket_size);
868
868
  }
869
869
  }
870
870
 
@@ -883,7 +883,7 @@ static void array_fill_fabric_indexed(wp::indexedfabricarray_t<void>& ifa, const
883
883
  }
884
884
 
885
885
 
886
- WP_API void array_fill_host(void* arr_ptr, int arr_type, const void* value_ptr, int value_size)
886
+ WP_API void wp_array_fill_host(void* arr_ptr, int arr_type, const void* value_ptr, int value_size)
887
887
  {
888
888
  if (!arr_ptr || !value_ptr)
889
889
  return;
@@ -924,191 +924,192 @@ WP_API void array_fill_host(void* arr_ptr, int arr_type, const void* value_ptr,
924
924
  // stubs for platforms where there is no CUDA
925
925
  #if !WP_ENABLE_CUDA
926
926
 
927
- void* alloc_pinned(size_t s)
927
+ void* wp_alloc_pinned(size_t s)
928
928
  {
929
929
  // CUDA is not available, fall back on system allocator
930
- return alloc_host(s);
930
+ return wp_alloc_host(s);
931
931
  }
932
932
 
933
- void free_pinned(void* ptr)
933
+ void wp_free_pinned(void* ptr)
934
934
  {
935
935
  // CUDA is not available, fall back on system allocator
936
- free_host(ptr);
936
+ wp_free_host(ptr);
937
937
  }
938
938
 
939
- void* alloc_device(void* context, size_t s)
939
+ void* wp_alloc_device(void* context, size_t s)
940
940
  {
941
941
  return NULL;
942
942
  }
943
943
 
944
- void* alloc_device_default(void* context, size_t s)
944
+ void* wp_alloc_device_default(void* context, size_t s)
945
945
  {
946
946
  return NULL;
947
947
  }
948
948
 
949
- void* alloc_device_async(void* context, size_t s)
949
+ void* wp_alloc_device_async(void* context, size_t s)
950
950
  {
951
951
  return NULL;
952
952
  }
953
953
 
954
- void free_device(void* context, void* ptr)
954
+ void wp_free_device(void* context, void* ptr)
955
955
  {
956
956
  }
957
957
 
958
- void free_device_default(void* context, void* ptr)
958
+ void wp_free_device_default(void* context, void* ptr)
959
959
  {
960
960
  }
961
961
 
962
- void free_device_async(void* context, void* ptr)
962
+ void wp_free_device_async(void* context, void* ptr)
963
963
  {
964
964
  }
965
965
 
966
- bool memcpy_h2d(void* context, void* dest, void* src, size_t n, void* stream)
966
+ bool wp_memcpy_h2d(void* context, void* dest, void* src, size_t n, void* stream)
967
967
  {
968
968
  return false;
969
969
  }
970
970
 
971
- bool memcpy_d2h(void* context, void* dest, void* src, size_t n, void* stream)
971
+ bool wp_memcpy_d2h(void* context, void* dest, void* src, size_t n, void* stream)
972
972
  {
973
973
  return false;
974
974
  }
975
975
 
976
- bool memcpy_d2d(void* context, void* dest, void* src, size_t n, void* stream)
976
+ bool wp_memcpy_d2d(void* context, void* dest, void* src, size_t n, void* stream)
977
977
  {
978
978
  return false;
979
979
  }
980
980
 
981
- bool memcpy_p2p(void* dst_context, void* dst, void* src_context, void* src, size_t n, void* stream)
981
+ bool wp_memcpy_p2p(void* dst_context, void* dst, void* src_context, void* src, size_t n, void* stream)
982
982
  {
983
983
  return false;
984
984
  }
985
985
 
986
- void memset_device(void* context, void* dest, int value, size_t n)
986
+ void wp_memset_device(void* context, void* dest, int value, size_t n)
987
987
  {
988
988
  }
989
989
 
990
- void memtile_device(void* context, void* dest, const void* src, size_t srcsize, size_t n)
990
+ void wp_memtile_device(void* context, void* dest, const void* src, size_t srcsize, size_t n)
991
991
  {
992
992
  }
993
993
 
994
- bool array_copy_device(void* context, void* dst, void* src, int dst_type, int src_type, int elem_size)
994
+ bool wp_array_copy_device(void* context, void* dst, void* src, int dst_type, int src_type, int elem_size)
995
995
  {
996
996
  return false;
997
997
  }
998
998
 
999
- void array_fill_device(void* context, void* arr, int arr_type, const void* value, int value_size)
999
+ void wp_array_fill_device(void* context, void* arr, int arr_type, const void* value, int value_size)
1000
1000
  {
1001
1001
  }
1002
1002
 
1003
- WP_API int cuda_driver_version() { return 0; }
1004
- WP_API int cuda_toolkit_version() { return 0; }
1005
- WP_API bool cuda_driver_is_initialized() { return false; }
1006
-
1007
- WP_API int nvrtc_supported_arch_count() { return 0; }
1008
- WP_API void nvrtc_supported_archs(int* archs) {}
1009
-
1010
- WP_API int cuda_device_get_count() { return 0; }
1011
- WP_API void* cuda_device_get_primary_context(int ordinal) { return NULL; }
1012
- WP_API const char* cuda_device_get_name(int ordinal) { return NULL; }
1013
- WP_API int cuda_device_get_arch(int ordinal) { return 0; }
1014
- WP_API int cuda_device_get_sm_count(int ordinal) { return 0; }
1015
- WP_API void cuda_device_get_uuid(int ordinal, char uuid[16]) {}
1016
- WP_API int cuda_device_get_pci_domain_id(int ordinal) { return -1; }
1017
- WP_API int cuda_device_get_pci_bus_id(int ordinal) { return -1; }
1018
- WP_API int cuda_device_get_pci_device_id(int ordinal) { return -1; }
1019
- WP_API int cuda_device_is_uva(int ordinal) { return 0; }
1020
- WP_API int cuda_device_is_mempool_supported(int ordinal) { return 0; }
1021
- WP_API int cuda_device_is_ipc_supported(int ordinal) { return 0; }
1022
- WP_API int cuda_device_set_mempool_release_threshold(int ordinal, uint64_t threshold) { return 0; }
1023
- WP_API uint64_t cuda_device_get_mempool_release_threshold(int ordinal) { return 0; }
1024
- WP_API uint64_t cuda_device_get_mempool_used_mem_current(int ordinal) { return 0; }
1025
- WP_API uint64_t cuda_device_get_mempool_used_mem_high(int ordinal) { return 0; }
1026
- WP_API void cuda_device_get_memory_info(int ordinal, size_t* free_mem, size_t* total_mem) {}
1027
-
1028
- WP_API void* cuda_context_get_current() { return NULL; }
1029
- WP_API void cuda_context_set_current(void* ctx) {}
1030
- WP_API void cuda_context_push_current(void* context) {}
1031
- WP_API void cuda_context_pop_current() {}
1032
- WP_API void* cuda_context_create(int device_ordinal) { return NULL; }
1033
- WP_API void cuda_context_destroy(void* context) {}
1034
- WP_API void cuda_context_synchronize(void* context) {}
1035
- WP_API uint64_t cuda_context_check(void* context) { return 0; }
1036
- WP_API int cuda_context_get_device_ordinal(void* context) { return -1; }
1037
- WP_API int cuda_context_is_primary(void* context) { return 0; }
1038
- WP_API void* cuda_context_get_stream(void* context) { return NULL; }
1039
- WP_API void cuda_context_set_stream(void* context, void* stream, int sync) {}
1040
-
1041
- WP_API int cuda_is_peer_access_supported(int target_ordinal, int peer_ordinal) { return 0; }
1042
- WP_API int cuda_is_peer_access_enabled(void* target_context, void* peer_context) { return 0; }
1043
- WP_API int cuda_set_peer_access_enabled(void* target_context, void* peer_context, int enable) { return 0; }
1044
- WP_API int cuda_is_mempool_access_enabled(int target_ordinal, int peer_ordinal) { return 0; }
1045
- WP_API int cuda_set_mempool_access_enabled(int target_ordinal, int peer_ordinal, int enable) { return 0; }
1046
-
1047
- WP_API void cuda_ipc_get_mem_handle(void* ptr, char* out_buffer) {}
1048
- WP_API void* cuda_ipc_open_mem_handle(void* context, char* handle) { return NULL; }
1049
- WP_API void cuda_ipc_close_mem_handle(void* ptr) {}
1050
- WP_API void cuda_ipc_get_event_handle(void* context, void* event, char* out_buffer) {}
1051
- WP_API void* cuda_ipc_open_event_handle(void* context, char* handle) { return NULL; }
1052
-
1053
- WP_API void* cuda_stream_create(void* context, int priority) { return NULL; }
1054
- WP_API void cuda_stream_destroy(void* context, void* stream) {}
1055
- WP_API int cuda_stream_query(void* stream) { return 0; }
1056
- WP_API void cuda_stream_register(void* context, void* stream) {}
1057
- WP_API void cuda_stream_unregister(void* context, void* stream) {}
1058
- WP_API void* cuda_stream_get_current() { return NULL; }
1059
- WP_API void cuda_stream_synchronize(void* stream) {}
1060
- WP_API void cuda_stream_wait_event(void* stream, void* event) {}
1061
- WP_API void cuda_stream_wait_stream(void* stream, void* other_stream, void* event) {}
1062
- WP_API int cuda_stream_is_capturing(void* stream) { return 0; }
1063
- WP_API uint64_t cuda_stream_get_capture_id(void* stream) { return 0; }
1064
- WP_API int cuda_stream_get_priority(void* stream) { return 0; }
1065
-
1066
- WP_API void* cuda_event_create(void* context, unsigned flags) { return NULL; }
1067
- WP_API void cuda_event_destroy(void* event) {}
1068
- WP_API int cuda_event_query(void* event) { return 0; }
1069
- WP_API void cuda_event_record(void* event, void* stream, bool timing) {}
1070
- WP_API void cuda_event_synchronize(void* event) {}
1071
- WP_API float cuda_event_elapsed_time(void* start_event, void* end_event) { return 0.0f; }
1072
-
1073
- WP_API bool cuda_graph_begin_capture(void* context, void* stream, int external) { return false; }
1074
- WP_API bool cuda_graph_end_capture(void* context, void* stream, void** graph_ret) { return false; }
1075
- WP_API bool cuda_graph_create_exec(void* context, void* stream, void* graph, void** graph_exec_ret) { return false; }
1076
- WP_API bool cuda_graph_launch(void* graph, void* stream) { return false; }
1077
- WP_API bool cuda_graph_destroy(void* context, void* graph) { return false; }
1078
- WP_API bool cuda_graph_exec_destroy(void* context, void* graph_exec) { return false; }
1079
- WP_API bool capture_debug_dot_print(void* graph, const char *path, uint32_t flags) { return false; }
1080
-
1081
- WP_API bool cuda_graph_insert_if_else(void* context, void* stream, int* condition, void** if_graph_ret, void** else_graph_ret) { return false; }
1082
- WP_API bool cuda_graph_insert_while(void* context, void* stream, int* condition, void** body_graph_ret, uint64_t* handle_ret) { return false; }
1083
- WP_API bool cuda_graph_set_condition(void* context, void* stream, int* condition, uint64_t handle) { return false; }
1084
- WP_API bool cuda_graph_pause_capture(void* context, void* stream, void** graph_ret) { return false; }
1085
- WP_API bool cuda_graph_resume_capture(void* context, void* stream, void* graph) { return false; }
1086
- WP_API bool cuda_graph_insert_child_graph(void* context, void* stream, void* child_graph) { return false; }
1087
-
1088
- WP_API size_t cuda_compile_program(const char* cuda_src, const char* program_name, int arch, const char* include_dir, int num_cuda_include_dirs, const char** cuda_include_dirs, bool debug, bool verbose, bool verify_fp, bool fast_math, bool fuse_fp, bool lineinfo, bool compile_time_trace, const char* output_path, size_t num_ltoirs, char** ltoirs, size_t* ltoir_sizes, int* ltoir_input_types) { return 0; }
1089
-
1090
- WP_API void* cuda_load_module(void* context, const char* ptx) { return NULL; }
1091
- WP_API void cuda_unload_module(void* context, void* module) {}
1092
- WP_API void* cuda_get_kernel(void* context, void* module, const char* name) { return NULL; }
1093
- WP_API size_t cuda_launch_kernel(void* context, void* kernel, size_t dim, int max_blocks, int block_dim, int shared_memory_bytes, void** args, void* stream) { return 0; }
1094
-
1095
- WP_API int cuda_get_max_shared_memory(void* context) { return 0; }
1096
- WP_API bool cuda_configure_kernel_shared_memory(void* kernel, int size) { return false; }
1097
-
1098
- WP_API void cuda_set_context_restore_policy(bool always_restore) {}
1099
- WP_API int cuda_get_context_restore_policy() { return false; }
1100
-
1101
- WP_API void array_scan_int_device(uint64_t in, uint64_t out, int len, bool inclusive) {}
1102
- WP_API void array_scan_float_device(uint64_t in, uint64_t out, int len, bool inclusive) {}
1103
-
1104
- WP_API void cuda_graphics_map(void* context, void* resource) {}
1105
- WP_API void cuda_graphics_unmap(void* context, void* resource) {}
1106
- WP_API void cuda_graphics_device_ptr_and_size(void* context, void* resource, uint64_t* ptr, size_t* size) {}
1107
- WP_API void* cuda_graphics_register_gl_buffer(void* context, uint32_t gl_buffer, unsigned int flags) { return NULL; }
1108
- WP_API void cuda_graphics_unregister_resource(void* context, void* resource) {}
1109
-
1110
- WP_API void cuda_timing_begin(int flags) {}
1111
- WP_API int cuda_timing_get_result_count() { return 0; }
1112
- WP_API void cuda_timing_end(timing_result_t* results, int size) {}
1003
+ WP_API int wp_cuda_driver_version() { return 0; }
1004
+ WP_API int wp_cuda_toolkit_version() { return 0; }
1005
+ WP_API bool wp_cuda_driver_is_initialized() { return false; }
1006
+
1007
+ WP_API int wp_nvrtc_supported_arch_count() { return 0; }
1008
+ WP_API void wp_nvrtc_supported_archs(int* archs) {}
1009
+
1010
+ WP_API int wp_cuda_device_get_count() { return 0; }
1011
+ WP_API void* wp_cuda_device_get_primary_context(int ordinal) { return NULL; }
1012
+ WP_API const char* wp_cuda_device_get_name(int ordinal) { return NULL; }
1013
+ WP_API int wp_cuda_device_get_arch(int ordinal) { return 0; }
1014
+ WP_API int wp_cuda_device_get_sm_count(int ordinal) { return 0; }
1015
+ WP_API void wp_cuda_device_get_uuid(int ordinal, char uuid[16]) {}
1016
+ WP_API int wp_cuda_device_get_pci_domain_id(int ordinal) { return -1; }
1017
+ WP_API int wp_cuda_device_get_pci_bus_id(int ordinal) { return -1; }
1018
+ WP_API int wp_cuda_device_get_pci_device_id(int ordinal) { return -1; }
1019
+ WP_API int wp_cuda_device_is_uva(int ordinal) { return 0; }
1020
+ WP_API int wp_cuda_device_is_mempool_supported(int ordinal) { return 0; }
1021
+ WP_API int wp_cuda_device_is_ipc_supported(int ordinal) { return 0; }
1022
+ WP_API int wp_cuda_device_set_mempool_release_threshold(int ordinal, uint64_t threshold) { return 0; }
1023
+ WP_API uint64_t wp_cuda_device_get_mempool_release_threshold(int ordinal) { return 0; }
1024
+ WP_API uint64_t wp_cuda_device_get_mempool_used_mem_current(int ordinal) { return 0; }
1025
+ WP_API uint64_t wp_cuda_device_get_mempool_used_mem_high(int ordinal) { return 0; }
1026
+ WP_API void wp_cuda_device_get_memory_info(int ordinal, size_t* free_mem, size_t* total_mem) {}
1027
+
1028
+ WP_API void* wp_cuda_context_get_current() { return NULL; }
1029
+ WP_API void wp_cuda_context_set_current(void* ctx) {}
1030
+ WP_API void wp_cuda_context_push_current(void* context) {}
1031
+ WP_API void wp_cuda_context_pop_current() {}
1032
+ WP_API void* wp_cuda_context_create(int device_ordinal) { return NULL; }
1033
+ WP_API void wp_cuda_context_destroy(void* context) {}
1034
+ WP_API void wp_cuda_context_synchronize(void* context) {}
1035
+ WP_API uint64_t wp_cuda_context_check(void* context) { return 0; }
1036
+ WP_API int wp_cuda_context_get_device_ordinal(void* context) { return -1; }
1037
+ WP_API int wp_cuda_context_is_primary(void* context) { return 0; }
1038
+ WP_API void* wp_cuda_context_get_stream(void* context) { return NULL; }
1039
+ WP_API void wp_cuda_context_set_stream(void* context, void* stream, int sync) {}
1040
+
1041
+ WP_API int wp_cuda_is_peer_access_supported(int target_ordinal, int peer_ordinal) { return 0; }
1042
+ WP_API int wp_cuda_is_peer_access_enabled(void* target_context, void* peer_context) { return 0; }
1043
+ WP_API int wp_cuda_set_peer_access_enabled(void* target_context, void* peer_context, int enable) { return 0; }
1044
+ WP_API int wp_cuda_is_mempool_access_enabled(int target_ordinal, int peer_ordinal) { return 0; }
1045
+ WP_API int wp_cuda_set_mempool_access_enabled(int target_ordinal, int peer_ordinal, int enable) { return 0; }
1046
+
1047
+ WP_API void wp_cuda_ipc_get_mem_handle(void* ptr, char* out_buffer) {}
1048
+ WP_API void* wp_cuda_ipc_open_mem_handle(void* context, char* handle) { return NULL; }
1049
+ WP_API void wp_cuda_ipc_close_mem_handle(void* ptr) {}
1050
+ WP_API void wp_cuda_ipc_get_event_handle(void* context, void* event, char* out_buffer) {}
1051
+ WP_API void* wp_cuda_ipc_open_event_handle(void* context, char* handle) { return NULL; }
1052
+
1053
+ WP_API void* wp_cuda_stream_create(void* context, int priority) { return NULL; }
1054
+ WP_API void wp_cuda_stream_destroy(void* context, void* stream) {}
1055
+ WP_API int wp_cuda_stream_query(void* stream) { return 0; }
1056
+ WP_API void wp_cuda_stream_register(void* context, void* stream) {}
1057
+ WP_API void wp_cuda_stream_unregister(void* context, void* stream) {}
1058
+ WP_API void* wp_cuda_stream_get_current() { return NULL; }
1059
+ WP_API void wp_cuda_stream_synchronize(void* stream) {}
1060
+ WP_API void wp_cuda_stream_wait_event(void* stream, void* event) {}
1061
+ WP_API void wp_cuda_stream_wait_stream(void* stream, void* other_stream, void* event) {}
1062
+ WP_API int wp_cuda_stream_is_capturing(void* stream) { return 0; }
1063
+ WP_API uint64_t wp_cuda_stream_get_capture_id(void* stream) { return 0; }
1064
+ WP_API int wp_cuda_stream_get_priority(void* stream) { return 0; }
1065
+
1066
+ WP_API void* wp_cuda_event_create(void* context, unsigned flags) { return NULL; }
1067
+ WP_API void wp_cuda_event_destroy(void* event) {}
1068
+ WP_API int wp_cuda_event_query(void* event) { return 0; }
1069
+ WP_API void wp_cuda_event_record(void* event, void* stream, bool timing) {}
1070
+ WP_API void wp_cuda_event_synchronize(void* event) {}
1071
+ WP_API float wp_cuda_event_elapsed_time(void* start_event, void* end_event) { return 0.0f; }
1072
+
1073
+ WP_API bool wp_cuda_graph_begin_capture(void* context, void* stream, int external) { return false; }
1074
+ WP_API bool wp_cuda_graph_end_capture(void* context, void* stream, void** graph_ret) { return false; }
1075
+ WP_API bool wp_cuda_graph_create_exec(void* context, void* stream, void* graph, void** graph_exec_ret) { return false; }
1076
+ WP_API bool wp_cuda_graph_launch(void* graph, void* stream) { return false; }
1077
+ WP_API bool wp_cuda_graph_destroy(void* context, void* graph) { return false; }
1078
+ WP_API bool wp_cuda_graph_exec_destroy(void* context, void* graph_exec) { return false; }
1079
+ WP_API bool wp_capture_debug_dot_print(void* graph, const char *path, uint32_t flags) { return false; }
1080
+
1081
+ WP_API bool wp_cuda_graph_insert_if_else(void* context, void* stream, int arch, bool use_ptx, int* condition, void** if_graph_ret, void** else_graph_ret) { return false; }
1082
+ WP_API bool wp_cuda_graph_insert_while(void* context, void* stream, int arch, bool use_ptx, int* condition, void** body_graph_ret, uint64_t* handle_ret) { return false; }
1083
+ WP_API bool wp_cuda_graph_set_condition(void* context, void* stream, int arch, bool use_ptx, int* condition, uint64_t handle) { return false; }
1084
+ WP_API bool wp_cuda_graph_pause_capture(void* context, void* stream, void** graph_ret) { return false; }
1085
+ WP_API bool wp_cuda_graph_resume_capture(void* context, void* stream, void* graph) { return false; }
1086
+ WP_API bool wp_cuda_graph_insert_child_graph(void* context, void* stream, void* child_graph) { return false; }
1087
+ WP_API bool wp_cuda_graph_check_conditional_body(void* body_graph) { return false; }
1088
+
1089
+ WP_API size_t wp_cuda_compile_program(const char* cuda_src, const char* program_name, int arch, const char* include_dir, int num_cuda_include_dirs, const char** cuda_include_dirs, bool debug, bool verbose, bool verify_fp, bool fast_math, bool fuse_fp, bool lineinfo, bool compile_time_trace, const char* output_path, size_t num_ltoirs, char** ltoirs, size_t* ltoir_sizes, int* ltoir_input_types) { return 0; }
1090
+
1091
+ WP_API void* wp_cuda_load_module(void* context, const char* ptx) { return NULL; }
1092
+ WP_API void wp_cuda_unload_module(void* context, void* module) {}
1093
+ WP_API void* wp_cuda_get_kernel(void* context, void* module, const char* name) { return NULL; }
1094
+ WP_API size_t wp_cuda_launch_kernel(void* context, void* kernel, size_t dim, int max_blocks, int block_dim, int shared_memory_bytes, void** args, void* stream) { return 0; }
1095
+
1096
+ WP_API int wp_cuda_get_max_shared_memory(void* context) { return 0; }
1097
+ WP_API bool wp_cuda_configure_kernel_shared_memory(void* kernel, int size) { return false; }
1098
+
1099
+ WP_API void wp_cuda_set_context_restore_policy(bool always_restore) {}
1100
+ WP_API int wp_cuda_get_context_restore_policy() { return false; }
1101
+
1102
+ WP_API void wp_array_scan_int_device(uint64_t in, uint64_t out, int len, bool inclusive) {}
1103
+ WP_API void wp_array_scan_float_device(uint64_t in, uint64_t out, int len, bool inclusive) {}
1104
+
1105
+ WP_API void wp_cuda_graphics_map(void* context, void* resource) {}
1106
+ WP_API void wp_cuda_graphics_unmap(void* context, void* resource) {}
1107
+ WP_API void wp_cuda_graphics_device_ptr_and_size(void* context, void* resource, uint64_t* ptr, size_t* size) {}
1108
+ WP_API void* wp_cuda_graphics_register_gl_buffer(void* context, uint32_t gl_buffer, unsigned int flags) { return NULL; }
1109
+ WP_API void wp_cuda_graphics_unregister_resource(void* context, void* resource) {}
1110
+
1111
+ WP_API void wp_cuda_timing_begin(int flags) {}
1112
+ WP_API int wp_cuda_timing_get_result_count() { return 0; }
1113
+ WP_API void wp_cuda_timing_end(timing_result_t* results, int size) {}
1113
1114
 
1114
1115
  #endif // !WP_ENABLE_CUDA