warp-lang 0.11.0__py3-none-manylinux2014_x86_64.whl → 1.0.0__py3-none-manylinux2014_x86_64.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.
- warp/__init__.py +8 -0
- warp/bin/warp-clang.so +0 -0
- warp/bin/warp.so +0 -0
- warp/build.py +7 -6
- warp/build_dll.py +70 -79
- warp/builtins.py +10 -6
- warp/codegen.py +51 -19
- warp/config.py +7 -8
- warp/constants.py +3 -0
- warp/context.py +948 -245
- warp/dlpack.py +198 -113
- warp/examples/assets/bunny.usd +0 -0
- warp/examples/assets/cartpole.urdf +110 -0
- warp/examples/assets/crazyflie.usd +0 -0
- warp/examples/assets/cube.usda +42 -0
- warp/examples/assets/nv_ant.xml +92 -0
- warp/examples/assets/nv_humanoid.xml +183 -0
- warp/examples/assets/quadruped.urdf +268 -0
- warp/examples/assets/rocks.nvdb +0 -0
- warp/examples/assets/rocks.usd +0 -0
- warp/examples/assets/sphere.usda +56 -0
- warp/examples/assets/torus.usda +105 -0
- warp/examples/benchmarks/benchmark_api.py +383 -0
- warp/examples/benchmarks/benchmark_cloth.py +279 -0
- warp/examples/benchmarks/benchmark_cloth_cupy.py +88 -0
- warp/examples/benchmarks/benchmark_cloth_jax.py +100 -0
- warp/examples/benchmarks/benchmark_cloth_numba.py +142 -0
- warp/examples/benchmarks/benchmark_cloth_numpy.py +77 -0
- warp/examples/benchmarks/benchmark_cloth_pytorch.py +86 -0
- warp/examples/benchmarks/benchmark_cloth_taichi.py +112 -0
- warp/examples/benchmarks/benchmark_cloth_warp.py +146 -0
- warp/examples/benchmarks/benchmark_launches.py +295 -0
- warp/examples/core/example_dem.py +221 -0
- warp/examples/core/example_fluid.py +267 -0
- warp/examples/core/example_graph_capture.py +129 -0
- warp/examples/core/example_marching_cubes.py +177 -0
- warp/examples/core/example_mesh.py +154 -0
- warp/examples/core/example_mesh_intersect.py +193 -0
- warp/examples/core/example_nvdb.py +169 -0
- warp/examples/core/example_raycast.py +89 -0
- warp/examples/core/example_raymarch.py +178 -0
- warp/examples/core/example_render_opengl.py +141 -0
- warp/examples/core/example_sph.py +389 -0
- warp/examples/core/example_torch.py +181 -0
- warp/examples/core/example_wave.py +249 -0
- warp/examples/fem/bsr_utils.py +380 -0
- warp/examples/fem/example_apic_fluid.py +391 -0
- warp/examples/fem/example_convection_diffusion.py +168 -0
- warp/examples/fem/example_convection_diffusion_dg.py +209 -0
- warp/examples/fem/example_convection_diffusion_dg0.py +194 -0
- warp/examples/fem/example_deformed_geometry.py +159 -0
- warp/examples/fem/example_diffusion.py +173 -0
- warp/examples/fem/example_diffusion_3d.py +152 -0
- warp/examples/fem/example_diffusion_mgpu.py +214 -0
- warp/examples/fem/example_mixed_elasticity.py +222 -0
- warp/examples/fem/example_navier_stokes.py +243 -0
- warp/examples/fem/example_stokes.py +192 -0
- warp/examples/fem/example_stokes_transfer.py +249 -0
- warp/examples/fem/mesh_utils.py +109 -0
- warp/examples/fem/plot_utils.py +287 -0
- warp/examples/optim/example_bounce.py +248 -0
- warp/examples/optim/example_cloth_throw.py +210 -0
- warp/examples/optim/example_diffray.py +535 -0
- warp/examples/optim/example_drone.py +850 -0
- warp/examples/optim/example_inverse_kinematics.py +169 -0
- warp/examples/optim/example_inverse_kinematics_torch.py +170 -0
- warp/examples/optim/example_spring_cage.py +234 -0
- warp/examples/optim/example_trajectory.py +201 -0
- warp/examples/sim/example_cartpole.py +128 -0
- warp/examples/sim/example_cloth.py +184 -0
- warp/examples/sim/example_granular.py +113 -0
- warp/examples/sim/example_granular_collision_sdf.py +185 -0
- warp/examples/sim/example_jacobian_ik.py +213 -0
- warp/examples/sim/example_particle_chain.py +106 -0
- warp/examples/sim/example_quadruped.py +179 -0
- warp/examples/sim/example_rigid_chain.py +191 -0
- warp/examples/sim/example_rigid_contact.py +176 -0
- warp/examples/sim/example_rigid_force.py +126 -0
- warp/examples/sim/example_rigid_gyroscopic.py +97 -0
- warp/examples/sim/example_rigid_soft_contact.py +124 -0
- warp/examples/sim/example_soft_body.py +178 -0
- warp/fabric.py +29 -20
- warp/fem/cache.py +0 -1
- warp/fem/dirichlet.py +0 -2
- warp/fem/integrate.py +0 -1
- warp/jax.py +45 -0
- warp/jax_experimental.py +339 -0
- warp/native/builtin.h +12 -0
- warp/native/bvh.cu +18 -18
- warp/native/clang/clang.cpp +8 -3
- warp/native/cuda_util.cpp +94 -5
- warp/native/cuda_util.h +35 -6
- warp/native/cutlass_gemm.cpp +1 -1
- warp/native/cutlass_gemm.cu +4 -1
- warp/native/error.cpp +66 -0
- warp/native/error.h +27 -0
- warp/native/mesh.cu +2 -2
- warp/native/reduce.cu +4 -4
- warp/native/runlength_encode.cu +2 -2
- warp/native/scan.cu +2 -2
- warp/native/sparse.cu +0 -1
- warp/native/temp_buffer.h +2 -2
- warp/native/warp.cpp +95 -60
- warp/native/warp.cu +1053 -218
- warp/native/warp.h +49 -32
- warp/optim/linear.py +33 -16
- warp/render/render_opengl.py +202 -101
- warp/render/render_usd.py +82 -40
- warp/sim/__init__.py +13 -4
- warp/sim/articulation.py +4 -5
- warp/sim/collide.py +320 -175
- warp/sim/import_mjcf.py +25 -30
- warp/sim/import_urdf.py +94 -63
- warp/sim/import_usd.py +51 -36
- warp/sim/inertia.py +3 -2
- warp/sim/integrator.py +233 -0
- warp/sim/integrator_euler.py +447 -469
- warp/sim/integrator_featherstone.py +1991 -0
- warp/sim/integrator_xpbd.py +1420 -640
- warp/sim/model.py +765 -487
- warp/sim/particles.py +2 -1
- warp/sim/render.py +35 -13
- warp/sim/utils.py +222 -11
- warp/stubs.py +8 -0
- warp/tape.py +16 -1
- warp/tests/aux_test_grad_customs.py +23 -0
- warp/tests/test_array.py +190 -1
- warp/tests/test_async.py +656 -0
- warp/tests/test_bool.py +50 -0
- warp/tests/test_dlpack.py +164 -11
- warp/tests/test_examples.py +166 -74
- warp/tests/test_fem.py +8 -1
- warp/tests/test_generics.py +15 -5
- warp/tests/test_grad.py +1 -1
- warp/tests/test_grad_customs.py +172 -12
- warp/tests/test_jax.py +254 -0
- warp/tests/test_large.py +29 -6
- warp/tests/test_launch.py +25 -0
- warp/tests/test_linear_solvers.py +20 -3
- warp/tests/test_matmul.py +61 -16
- warp/tests/test_matmul_lite.py +13 -13
- warp/tests/test_mempool.py +186 -0
- warp/tests/test_multigpu.py +3 -0
- warp/tests/test_options.py +16 -2
- warp/tests/test_peer.py +137 -0
- warp/tests/test_print.py +3 -1
- warp/tests/test_quat.py +23 -0
- warp/tests/test_sim_kinematics.py +97 -0
- warp/tests/test_snippet.py +126 -3
- warp/tests/test_streams.py +108 -79
- warp/tests/test_torch.py +16 -8
- warp/tests/test_utils.py +32 -27
- warp/tests/test_verify_fp.py +65 -0
- warp/tests/test_volume.py +1 -1
- warp/tests/unittest_serial.py +2 -0
- warp/tests/unittest_suites.py +12 -0
- warp/tests/unittest_utils.py +14 -7
- warp/thirdparty/unittest_parallel.py +15 -3
- warp/torch.py +10 -8
- warp/types.py +363 -246
- warp/utils.py +143 -19
- warp_lang-1.0.0.dist-info/LICENSE.md +126 -0
- warp_lang-1.0.0.dist-info/METADATA +394 -0
- {warp_lang-0.11.0.dist-info → warp_lang-1.0.0.dist-info}/RECORD +167 -86
- warp/sim/optimizer.py +0 -138
- warp_lang-0.11.0.dist-info/LICENSE.md +0 -36
- warp_lang-0.11.0.dist-info/METADATA +0 -238
- /warp/tests/{walkthough_debug.py → walkthrough_debug.py} +0 -0
- {warp_lang-0.11.0.dist-info → warp_lang-1.0.0.dist-info}/WHEEL +0 -0
- {warp_lang-0.11.0.dist-info → warp_lang-1.0.0.dist-info}/top_level.txt +0 -0
warp/native/warp.cpp
CHANGED
|
@@ -9,14 +9,11 @@
|
|
|
9
9
|
#include "warp.h"
|
|
10
10
|
#include "scan.h"
|
|
11
11
|
#include "array.h"
|
|
12
|
-
|
|
13
12
|
#include "exports.h"
|
|
13
|
+
#include "error.h"
|
|
14
14
|
|
|
15
|
-
#include
|
|
16
|
-
#include
|
|
17
|
-
|
|
18
|
-
int cuda_init();
|
|
19
|
-
|
|
15
|
+
#include <stdlib.h>
|
|
16
|
+
#include <string.h>
|
|
20
17
|
|
|
21
18
|
uint16_t float_to_half_bits(float x)
|
|
22
19
|
{
|
|
@@ -108,6 +105,7 @@ float half_bits_to_float(uint16_t u)
|
|
|
108
105
|
int init()
|
|
109
106
|
{
|
|
110
107
|
#if WP_ENABLE_CUDA
|
|
108
|
+
int cuda_init();
|
|
111
109
|
// note: it's safe to proceed even if CUDA initialization failed
|
|
112
110
|
cuda_init();
|
|
113
111
|
#endif
|
|
@@ -119,6 +117,21 @@ void shutdown()
|
|
|
119
117
|
{
|
|
120
118
|
}
|
|
121
119
|
|
|
120
|
+
const char* get_error_string()
|
|
121
|
+
{
|
|
122
|
+
return wp::get_error_string();
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
void set_error_output_enabled(int enable)
|
|
126
|
+
{
|
|
127
|
+
wp::set_error_output_enabled(bool(enable));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
int is_error_output_enabled()
|
|
131
|
+
{
|
|
132
|
+
return int(wp::is_error_output_enabled());
|
|
133
|
+
}
|
|
134
|
+
|
|
122
135
|
int is_cuda_enabled()
|
|
123
136
|
{
|
|
124
137
|
return int(WP_ENABLE_CUDA);
|
|
@@ -149,9 +162,10 @@ void free_host(void* ptr)
|
|
|
149
162
|
free(ptr);
|
|
150
163
|
}
|
|
151
164
|
|
|
152
|
-
|
|
165
|
+
bool memcpy_h2h(void* dest, void* src, size_t n)
|
|
153
166
|
{
|
|
154
167
|
memcpy(dest, src, n);
|
|
168
|
+
return true;
|
|
155
169
|
}
|
|
156
170
|
|
|
157
171
|
void memset_host(void* dest, int value, size_t n)
|
|
@@ -551,15 +565,13 @@ static void array_copy_from_fabric_indexed(const wp::indexedfabricarray_t<void>&
|
|
|
551
565
|
}
|
|
552
566
|
|
|
553
567
|
|
|
554
|
-
WP_API
|
|
568
|
+
WP_API bool array_copy_host(void* dst, void* src, int dst_type, int src_type, int elem_size)
|
|
555
569
|
{
|
|
556
570
|
if (!src || !dst)
|
|
557
|
-
return
|
|
571
|
+
return false;
|
|
558
572
|
|
|
559
573
|
const void* src_data = NULL;
|
|
560
|
-
const void* src_grad = NULL;
|
|
561
574
|
void* dst_data = NULL;
|
|
562
|
-
void* dst_grad = NULL;
|
|
563
575
|
int src_ndim = 0;
|
|
564
576
|
int dst_ndim = 0;
|
|
565
577
|
const int* src_shape = NULL;
|
|
@@ -581,7 +593,6 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
581
593
|
{
|
|
582
594
|
const wp::array_t<void>& src_arr = *static_cast<const wp::array_t<void>*>(src);
|
|
583
595
|
src_data = src_arr.data;
|
|
584
|
-
src_grad = src_arr.grad;
|
|
585
596
|
src_ndim = src_arr.ndim;
|
|
586
597
|
src_shape = src_arr.shape.dims;
|
|
587
598
|
src_strides = src_arr.strides;
|
|
@@ -609,14 +620,13 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
609
620
|
else
|
|
610
621
|
{
|
|
611
622
|
fprintf(stderr, "Warp copy error: Invalid source array type (%d)\n", src_type);
|
|
612
|
-
return
|
|
623
|
+
return false;
|
|
613
624
|
}
|
|
614
625
|
|
|
615
626
|
if (dst_type == wp::ARRAY_TYPE_REGULAR)
|
|
616
627
|
{
|
|
617
628
|
const wp::array_t<void>& dst_arr = *static_cast<const wp::array_t<void>*>(dst);
|
|
618
629
|
dst_data = dst_arr.data;
|
|
619
|
-
dst_grad = dst_arr.grad;
|
|
620
630
|
dst_ndim = dst_arr.ndim;
|
|
621
631
|
dst_shape = dst_arr.shape.dims;
|
|
622
632
|
dst_strides = dst_arr.strides;
|
|
@@ -644,13 +654,13 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
644
654
|
else
|
|
645
655
|
{
|
|
646
656
|
fprintf(stderr, "Warp copy error: Invalid destination array type (%d)\n", dst_type);
|
|
647
|
-
return
|
|
657
|
+
return false;
|
|
648
658
|
}
|
|
649
659
|
|
|
650
660
|
if (src_ndim != dst_ndim)
|
|
651
661
|
{
|
|
652
662
|
fprintf(stderr, "Warp copy error: Incompatible array dimensionalities (%d and %d)\n", src_ndim, dst_ndim);
|
|
653
|
-
return
|
|
663
|
+
return false;
|
|
654
664
|
}
|
|
655
665
|
|
|
656
666
|
// handle fabric arrays
|
|
@@ -663,10 +673,10 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
663
673
|
if (src_fabricarray->size != n)
|
|
664
674
|
{
|
|
665
675
|
fprintf(stderr, "Warp copy error: Incompatible array sizes\n");
|
|
666
|
-
return
|
|
676
|
+
return false;
|
|
667
677
|
}
|
|
668
678
|
array_copy_fabric_to_fabric(*dst_fabricarray, *src_fabricarray, elem_size);
|
|
669
|
-
return
|
|
679
|
+
return true;
|
|
670
680
|
}
|
|
671
681
|
else if (src_indexedfabricarray)
|
|
672
682
|
{
|
|
@@ -674,10 +684,10 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
674
684
|
if (src_indexedfabricarray->size != n)
|
|
675
685
|
{
|
|
676
686
|
fprintf(stderr, "Warp copy error: Incompatible array sizes\n");
|
|
677
|
-
return
|
|
687
|
+
return false;
|
|
678
688
|
}
|
|
679
689
|
array_copy_fabric_indexed_to_fabric(*dst_fabricarray, *src_indexedfabricarray, elem_size);
|
|
680
|
-
return
|
|
690
|
+
return true;
|
|
681
691
|
}
|
|
682
692
|
else
|
|
683
693
|
{
|
|
@@ -685,10 +695,10 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
685
695
|
if (size_t(src_shape[0]) != n)
|
|
686
696
|
{
|
|
687
697
|
fprintf(stderr, "Warp copy error: Incompatible array sizes\n");
|
|
688
|
-
return
|
|
698
|
+
return false;
|
|
689
699
|
}
|
|
690
700
|
array_copy_to_fabric(*dst_fabricarray, src_data, src_strides[0], src_indices[0], elem_size);
|
|
691
|
-
return
|
|
701
|
+
return true;
|
|
692
702
|
}
|
|
693
703
|
}
|
|
694
704
|
else if (dst_indexedfabricarray)
|
|
@@ -700,10 +710,10 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
700
710
|
if (src_fabricarray->size != n)
|
|
701
711
|
{
|
|
702
712
|
fprintf(stderr, "Warp copy error: Incompatible array sizes\n");
|
|
703
|
-
return
|
|
713
|
+
return false;
|
|
704
714
|
}
|
|
705
715
|
array_copy_fabric_to_fabric_indexed(*dst_indexedfabricarray, *src_fabricarray, elem_size);
|
|
706
|
-
return
|
|
716
|
+
return true;
|
|
707
717
|
}
|
|
708
718
|
else if (src_indexedfabricarray)
|
|
709
719
|
{
|
|
@@ -711,10 +721,10 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
711
721
|
if (src_indexedfabricarray->size != n)
|
|
712
722
|
{
|
|
713
723
|
fprintf(stderr, "Warp copy error: Incompatible array sizes\n");
|
|
714
|
-
return
|
|
724
|
+
return false;
|
|
715
725
|
}
|
|
716
726
|
array_copy_fabric_indexed_to_fabric_indexed(*dst_indexedfabricarray, *src_indexedfabricarray, elem_size);
|
|
717
|
-
return
|
|
727
|
+
return true;
|
|
718
728
|
}
|
|
719
729
|
else
|
|
720
730
|
{
|
|
@@ -722,10 +732,10 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
722
732
|
if (size_t(src_shape[0]) != n)
|
|
723
733
|
{
|
|
724
734
|
fprintf(stderr, "Warp copy error: Incompatible array sizes\n");
|
|
725
|
-
return
|
|
735
|
+
return false;
|
|
726
736
|
}
|
|
727
737
|
array_copy_to_fabric_indexed(*dst_indexedfabricarray, src_data, src_strides[0], src_indices[0], elem_size);
|
|
728
|
-
return
|
|
738
|
+
return true;
|
|
729
739
|
}
|
|
730
740
|
}
|
|
731
741
|
else if (src_fabricarray)
|
|
@@ -735,10 +745,10 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
735
745
|
if (size_t(dst_shape[0]) != n)
|
|
736
746
|
{
|
|
737
747
|
fprintf(stderr, "Warp copy error: Incompatible array sizes\n");
|
|
738
|
-
return
|
|
748
|
+
return false;
|
|
739
749
|
}
|
|
740
750
|
array_copy_from_fabric(*src_fabricarray, dst_data, dst_strides[0], dst_indices[0], elem_size);
|
|
741
|
-
return
|
|
751
|
+
return true;
|
|
742
752
|
}
|
|
743
753
|
else if (src_indexedfabricarray)
|
|
744
754
|
{
|
|
@@ -747,13 +757,12 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
747
757
|
if (size_t(dst_shape[0]) != n)
|
|
748
758
|
{
|
|
749
759
|
fprintf(stderr, "Warp copy error: Incompatible array sizes\n");
|
|
750
|
-
return
|
|
760
|
+
return false;
|
|
751
761
|
}
|
|
752
762
|
array_copy_from_fabric_indexed(*src_indexedfabricarray, dst_data, dst_strides[0], dst_indices[0], elem_size);
|
|
753
|
-
return
|
|
763
|
+
return true;
|
|
754
764
|
}
|
|
755
765
|
|
|
756
|
-
size_t n = 1;
|
|
757
766
|
for (int i = 0; i < src_ndim; i++)
|
|
758
767
|
{
|
|
759
768
|
if (src_shape[i] != dst_shape[i])
|
|
@@ -761,7 +770,6 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
761
770
|
fprintf(stderr, "Warp copy error: Incompatible array shapes\n");
|
|
762
771
|
return 0;
|
|
763
772
|
}
|
|
764
|
-
n *= src_shape[i];
|
|
765
773
|
}
|
|
766
774
|
|
|
767
775
|
array_copy_nd(dst_data, src_data,
|
|
@@ -769,7 +777,7 @@ WP_API size_t array_copy_host(void* dst, void* src, int dst_type, int src_type,
|
|
|
769
777
|
dst_indices, src_indices,
|
|
770
778
|
src_shape, src_ndim, elem_size);
|
|
771
779
|
|
|
772
|
-
return
|
|
780
|
+
return true;
|
|
773
781
|
}
|
|
774
782
|
|
|
775
783
|
|
|
@@ -886,8 +894,6 @@ WP_API void array_fill_host(void* arr_ptr, int arr_type, const void* value_ptr,
|
|
|
886
894
|
// stubs for platforms where there is no CUDA
|
|
887
895
|
#if !WP_ENABLE_CUDA
|
|
888
896
|
|
|
889
|
-
int cuda_init() { return -1; }
|
|
890
|
-
|
|
891
897
|
void* alloc_pinned(size_t s)
|
|
892
898
|
{
|
|
893
899
|
// CUDA is not available, fall back on system allocator
|
|
@@ -905,25 +911,46 @@ void* alloc_device(void* context, size_t s)
|
|
|
905
911
|
return NULL;
|
|
906
912
|
}
|
|
907
913
|
|
|
914
|
+
void* alloc_device_default(void* context, size_t s)
|
|
915
|
+
{
|
|
916
|
+
return NULL;
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
void* alloc_device_async(void* context, size_t s)
|
|
920
|
+
{
|
|
921
|
+
return NULL;
|
|
922
|
+
}
|
|
923
|
+
|
|
908
924
|
void free_device(void* context, void* ptr)
|
|
909
925
|
{
|
|
910
926
|
}
|
|
911
927
|
|
|
928
|
+
void free_device_default(void* context, void* ptr)
|
|
929
|
+
{
|
|
930
|
+
}
|
|
912
931
|
|
|
913
|
-
void
|
|
932
|
+
void free_device_async(void* context, void* ptr)
|
|
914
933
|
{
|
|
915
934
|
}
|
|
916
935
|
|
|
917
|
-
|
|
936
|
+
bool memcpy_h2d(void* context, void* dest, void* src, size_t n, void* stream)
|
|
918
937
|
{
|
|
938
|
+
return false;
|
|
919
939
|
}
|
|
920
940
|
|
|
921
|
-
|
|
941
|
+
bool memcpy_d2h(void* context, void* dest, void* src, size_t n, void* stream)
|
|
922
942
|
{
|
|
943
|
+
return false;
|
|
923
944
|
}
|
|
924
945
|
|
|
925
|
-
|
|
946
|
+
bool memcpy_d2d(void* context, void* dest, void* src, size_t n, void* stream)
|
|
926
947
|
{
|
|
948
|
+
return false;
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
bool memcpy_p2p(void* dst_context, void* dst, void* src_context, void* src, size_t n, void* stream)
|
|
952
|
+
{
|
|
953
|
+
return false;
|
|
927
954
|
}
|
|
928
955
|
|
|
929
956
|
void memset_device(void* context, void* dest, int value, size_t n)
|
|
@@ -934,9 +961,9 @@ void memtile_device(void* context, void* dest, const void* src, size_t srcsize,
|
|
|
934
961
|
{
|
|
935
962
|
}
|
|
936
963
|
|
|
937
|
-
|
|
964
|
+
bool array_copy_device(void* context, void* dst, void* src, int dst_type, int src_type, int elem_size)
|
|
938
965
|
{
|
|
939
|
-
return
|
|
966
|
+
return false;
|
|
940
967
|
}
|
|
941
968
|
|
|
942
969
|
void array_fill_device(void* context, void* arr, int arr_type, const void* value, int value_size)
|
|
@@ -951,8 +978,7 @@ WP_API int nvrtc_supported_arch_count() { return 0; }
|
|
|
951
978
|
WP_API void nvrtc_supported_archs(int* archs) {}
|
|
952
979
|
|
|
953
980
|
WP_API int cuda_device_get_count() { return 0; }
|
|
954
|
-
WP_API void*
|
|
955
|
-
WP_API void cuda_device_primary_context_release(int ordinal) {}
|
|
981
|
+
WP_API void* cuda_device_get_primary_context(int ordinal) { return NULL; }
|
|
956
982
|
WP_API const char* cuda_device_get_name(int ordinal) { return NULL; }
|
|
957
983
|
WP_API int cuda_device_get_arch(int ordinal) { return 0; }
|
|
958
984
|
WP_API void cuda_device_get_uuid(int ordinal, char uuid[16]) {}
|
|
@@ -960,7 +986,10 @@ WP_API int cuda_device_get_pci_domain_id(int ordinal) { return -1; }
|
|
|
960
986
|
WP_API int cuda_device_get_pci_bus_id(int ordinal) { return -1; }
|
|
961
987
|
WP_API int cuda_device_get_pci_device_id(int ordinal) { return -1; }
|
|
962
988
|
WP_API int cuda_device_is_uva(int ordinal) { return 0; }
|
|
963
|
-
WP_API int
|
|
989
|
+
WP_API int cuda_device_is_mempool_supported(int ordinal) { return 0; }
|
|
990
|
+
WP_API int cuda_device_set_mempool_release_threshold(int ordinal, uint64_t threshold) { return 0; }
|
|
991
|
+
WP_API uint64_t cuda_device_get_mempool_release_threshold(int ordinal) { return 0; }
|
|
992
|
+
WP_API void cuda_device_get_memory_info(int ordinal, size_t* free_mem, size_t* total_mem) {}
|
|
964
993
|
|
|
965
994
|
WP_API void* cuda_context_get_current() { return NULL; }
|
|
966
995
|
WP_API void cuda_context_set_current(void* ctx) {}
|
|
@@ -972,34 +1001,40 @@ WP_API void cuda_context_synchronize(void* context) {}
|
|
|
972
1001
|
WP_API uint64_t cuda_context_check(void* context) { return 0; }
|
|
973
1002
|
WP_API int cuda_context_get_device_ordinal(void* context) { return -1; }
|
|
974
1003
|
WP_API int cuda_context_is_primary(void* context) { return 0; }
|
|
975
|
-
WP_API int cuda_context_is_memory_pool_supported(void* context) { return 0; }
|
|
976
1004
|
WP_API void* cuda_context_get_stream(void* context) { return NULL; }
|
|
977
|
-
WP_API void cuda_context_set_stream(void* context, void* stream) {}
|
|
978
|
-
|
|
979
|
-
WP_API int
|
|
1005
|
+
WP_API void cuda_context_set_stream(void* context, void* stream, int sync) {}
|
|
1006
|
+
|
|
1007
|
+
WP_API int cuda_is_peer_access_supported(int target_ordinal, int peer_ordinal) { return 0; }
|
|
1008
|
+
WP_API int cuda_is_peer_access_enabled(void* target_context, void* peer_context) { return 0; }
|
|
1009
|
+
WP_API int cuda_set_peer_access_enabled(void* target_context, void* peer_context, int enable) { return 0; }
|
|
1010
|
+
WP_API int cuda_is_mempool_access_enabled(int target_ordinal, int peer_ordinal) { return 0; }
|
|
1011
|
+
WP_API int cuda_set_mempool_access_enabled(int target_ordinal, int peer_ordinal, int enable) { return 0; }
|
|
980
1012
|
|
|
981
1013
|
WP_API void* cuda_stream_create(void* context) { return NULL; }
|
|
982
1014
|
WP_API void cuda_stream_destroy(void* context, void* stream) {}
|
|
1015
|
+
WP_API void cuda_stream_register(void* context, void* stream) {}
|
|
1016
|
+
WP_API void cuda_stream_unregister(void* context, void* stream) {}
|
|
983
1017
|
WP_API void* cuda_stream_get_current() { return NULL; }
|
|
984
|
-
WP_API void cuda_stream_synchronize(void*
|
|
985
|
-
WP_API void cuda_stream_wait_event(void*
|
|
986
|
-
WP_API void cuda_stream_wait_stream(void*
|
|
1018
|
+
WP_API void cuda_stream_synchronize(void* stream) {}
|
|
1019
|
+
WP_API void cuda_stream_wait_event(void* stream, void* event) {}
|
|
1020
|
+
WP_API void cuda_stream_wait_stream(void* stream, void* other_stream, void* event) {}
|
|
1021
|
+
WP_API int cuda_stream_is_capturing(void* stream) { return 0; }
|
|
987
1022
|
|
|
988
1023
|
WP_API void* cuda_event_create(void* context, unsigned flags) { return NULL; }
|
|
989
|
-
WP_API void cuda_event_destroy(void*
|
|
990
|
-
WP_API void cuda_event_record(void*
|
|
1024
|
+
WP_API void cuda_event_destroy(void* event) {}
|
|
1025
|
+
WP_API void cuda_event_record(void* event, void* stream) {}
|
|
991
1026
|
|
|
992
|
-
WP_API
|
|
993
|
-
WP_API
|
|
994
|
-
WP_API
|
|
995
|
-
WP_API
|
|
1027
|
+
WP_API bool cuda_graph_begin_capture(void* context, void* stream, int external) { return false; }
|
|
1028
|
+
WP_API bool cuda_graph_end_capture(void* context, void* stream, void** graph_ret) { return false; }
|
|
1029
|
+
WP_API bool cuda_graph_launch(void* graph, void* stream) { return false; }
|
|
1030
|
+
WP_API bool cuda_graph_destroy(void* context, void* graph) { return false; }
|
|
996
1031
|
|
|
997
1032
|
WP_API size_t cuda_compile_program(const char* cuda_src, int arch, const char* include_dir, bool debug, bool verbose, bool verify_fp, bool fast_math, const char* output_file) { return 0; }
|
|
998
1033
|
|
|
999
1034
|
WP_API void* cuda_load_module(void* context, const char* ptx) { return NULL; }
|
|
1000
1035
|
WP_API void cuda_unload_module(void* context, void* module) {}
|
|
1001
1036
|
WP_API void* cuda_get_kernel(void* context, void* module, const char* name) { return NULL; }
|
|
1002
|
-
WP_API size_t cuda_launch_kernel(void* context, void* kernel, size_t dim, int max_blocks, void** args) { return 0;}
|
|
1037
|
+
WP_API size_t cuda_launch_kernel(void* context, void* kernel, size_t dim, int max_blocks, void** args, void* stream) { return 0; }
|
|
1003
1038
|
|
|
1004
1039
|
WP_API void cuda_set_context_restore_policy(bool always_restore) {}
|
|
1005
1040
|
WP_API int cuda_get_context_restore_policy() { return false; }
|