hyperray 0.0.1__py3-none-any.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.
- hyperdrone/__init__.py +53 -0
- hyperdrone/_cuda/__init__.py +76 -0
- hyperdrone/_dlpack.py +30 -0
- hyperdrone/_jit/__init__.py +131 -0
- hyperdrone/_jit/_build.py +113 -0
- hyperdrone/_jit/_lock.py +23 -0
- hyperdrone/_jit/_patches.py +99 -0
- hyperdrone/_jit/_toolchain.py +17 -0
- hyperdrone/_jit/_workspace.py +94 -0
- hyperdrone/_native/cmake/hyperdrone_jit.cmake +65 -0
- hyperdrone/_native/common/bindings.h +39 -0
- hyperdrone/_native/common/cuda_staging.h +80 -0
- hyperdrone/_native/common/jit_host.h +69 -0
- hyperdrone/_native/common/models.h +24 -0
- hyperdrone/_native/common/verbosity.h +52 -0
- hyperdrone/_native/dynamics/CMakeLists.txt +63 -0
- hyperdrone/_native/dynamics/host.cpp +188 -0
- hyperdrone/_native/dynamics/iface.h +71 -0
- hyperdrone/_native/dynamics/impl.cpp +638 -0
- hyperdrone/_native/env/CMakeLists.txt +98 -0
- hyperdrone/_native/env/environment.cpp +190 -0
- hyperdrone/_native/env/environment.h +282 -0
- hyperdrone/_native/env/impl.cpp +779 -0
- hyperdrone/_native/env/rotorcraft_bindings.cpp +53 -0
- hyperdrone/_native/render/CMakeLists.txt +96 -0
- hyperdrone/_native/render/renderer.cpp +973 -0
- hyperdrone/_native/render/rig_bindings.h +152 -0
- hyperdrone/_native/render/scene_bindings.cpp +515 -0
- hyperdrone/_outputs.py +32 -0
- hyperdrone/_parameters.py +36 -0
- hyperdrone/_vendor/rl-tools/CMakeLists.txt +207 -0
- hyperdrone/_vendor/rl-tools/LICENSE +21 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/all.cmake +34 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/git-diff.cmake +100 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/git-hash.cmake +24 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/summary.cmake +65 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier0-compiler.cmake +18 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier1-blas.cmake +51 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier2-json-hdf5-zlib.cmake +82 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier3-tensorboard.cmake +25 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier4-cuda.cmake +42 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier5-cli11.cmake +24 -0
- hyperdrone/_vendor/rl-tools/cmake/dependencies/assimp.cmake +19 -0
- hyperdrone/_vendor/rl-tools/cmake/legacy_flags.cmake +33 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/assimp.cmake +30 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/googletest.cmake +20 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/metal.cmake +25 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/mujoco.cmake +89 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/optix.cmake +25 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/raytracing.cmake +105 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/raytracing_generic.cmake +2 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/vulkan.cmake +4 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/webgpu.cmake +24 -0
- hyperdrone/_vendor/rl-tools/cmake/scripts/embed_text.cmake +7 -0
- hyperdrone/_vendor/rl-tools/cmake/scripts/generate-git-snapshot.cmake +138 -0
- hyperdrone/_vendor/rl-tools/include/conta/conta.h +1480 -0
- hyperdrone/_vendor/rl-tools/include/metra/metra.h +381 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/matrix.h +143 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_arm.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu.h +314 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_accelerate.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_blas.h +67 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_mkl.h +38 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_openblas.h +34 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cuda.h +289 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_dummy.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_esp32.h +29 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_generic.h +944 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_wasm32.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/persist_code.h +136 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_arm.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu.h +94 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_accelerate.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_blas.h +115 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_mkl.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_openblas.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cuda.h +713 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_generic.h +1356 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/persist_code.h +130 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/tensor.h +490 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/arm.h +91 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu.h +210 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_accelerate.h +23 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_blas.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_emscripten.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_mkl.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_openblas.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_tensorboard.h +34 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cuda.h +464 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cuda_streams.h +23 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/devices.h +105 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/dummy.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/esp32.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/generic.h +0 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/wasm32.h +59 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/model.h +218 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/operations_generic.h +769 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/persist.h +278 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/policy_adapter.h +100 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/policy_adapter_persist.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/tensor_operations_generic.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/c_backend.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/c_interface.h +36 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/l2f.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/operations_dyn.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/operations_generic.h +268 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/debugging_pool/c_backend.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/debugging_pool/c_interface.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/c_backend.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/c_interface.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/executor.h +133 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/helper.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/operations_generic.h +219 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_arduino.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_arm.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cpu.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cpu_tensorboard.h +151 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cuda.h +65 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_dummy.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_wasm32.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_arm.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_cpu.h +138 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_cuda.h +380 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_dummy.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_esp32.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_generic.h +295 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_wasm32.h +230 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/mode/mode.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/activation_functions.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/capability.h +61 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/persist_code.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/group.h +99 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/layer.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/operations_cuda.h +64 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/operations_generic.h +186 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/persist.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/layer.h +300 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_cpu_mkl.h +590 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_cuda.h +809 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_generic.h +1219 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/persist.h +99 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/persist_code.h +170 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/layer.h +145 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_arm/dsp.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_arm/opt.h +173 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_accelerate.h +66 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_blas.h +282 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_mkl.h +66 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_openblas.h +65 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cuda.h +519 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_dummy.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_esp32/dsp.h +58 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_esp32/opt.h +167 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_generic.h +429 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist.h +62 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist_code.h +178 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist_common.h +59 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/layer.h +188 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/operations_cuda.h +356 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/operations_generic.h +536 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/persist.h +32 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/layer.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/operations_generic.h +223 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/persist.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/layer.h +121 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/operations_generic.h +154 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/persist.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/persist_code.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/helper_operations_cuda.h +602 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/helper_operations_generic.h +251 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/layer.h +206 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/operations_generic.h +889 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/persist.h +75 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/persist_code.h +199 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/layers.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/layer.h +143 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/operations_cuda.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/operations_generic.h +216 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/persist.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_accelerate.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_blas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_mkl.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_openblas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cuda.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_dummy.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_generic.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/layer.h +223 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/operations_cuda.h +138 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/operations_generic.h +446 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/persist.h +70 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/layer.h +154 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/operations_cuda.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/operations_generic.h +502 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/persist.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/persist_code.h +173 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/layer.h +116 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/operations_cuda.h +156 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/operations_generic.h +295 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/persist.h +83 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/persist_code.h +163 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/layer.h +123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/operations_generic.h +272 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/persist.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/persist_code.h +164 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/layer.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/operations_cuda.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/operations_generic.h +160 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/persist.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/persist_code.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/layer.h +132 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/operations_cuda.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/operations_generic.h +230 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/categorical_cross_entropy/operations_generic.h +102 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/mse/operations_cuda.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/mse/operations_generic.h +101 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/operations_generic.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/nn.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_accelerate.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_blas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_mkl.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_mux.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_openblas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cuda.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_dummy.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_generic.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/adam.h +121 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_cuda.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_generic.h +150 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/persist.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/persist_code.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_cuda.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_generic.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/persist.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/instance/operations_generic.h +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/lamb.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/operations_generic.h +68 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/optimizers.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/operations_cuda.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/operations_generic.h +140 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/persist.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/persist_code.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_cuda.h +49 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_generic.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/sgd.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/update.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/operations_cuda.h +0 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/operations_generic.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/parameters.h +79 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/persist.h +34 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/persist_code.h +136 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/persist.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/persist_code.h +27 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/behaviors/skip_parameter_gradients.h +65 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/README.md +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/model.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/persist_code.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/network.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_cuda.h +10 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_dummy.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_generic.h +407 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/persist.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/persist_code.h +137 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/network.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/operations_generic.h +86 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/persist.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/persist_code.h +142 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/models.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/model.h +148 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/operations_generic.h +288 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/persist.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/persist_code.h +71 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_cpu.h +0 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_cuda.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_dummy.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_generic.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/model.h +290 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_cuda.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_generic.h +623 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/persist.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/persist_code.h +200 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/persist.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/persist_code.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/random_uniform/model.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/random_uniform/operations_generic.h +73 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/resnet/resnet.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/model.h +270 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/operations_generic.h +625 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/persist.h +99 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/persist_code.h +115 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/bf16.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/categories.h +22 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/persist_code.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/policy.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_1.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_2.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_3.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_1.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_1.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mux.h +158 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_1.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_3.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_1.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_3.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_3.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_1.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_3.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/hdf5/hdf5.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/hdf5/operations_cpu.h +419 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/io.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_cpu.h +58 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_generic.h +620 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_posix.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/tar.h +74 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/code.h +38 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_arm.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_cpu.h +81 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_cuda.h +172 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_dummy.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_esp32.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_generic.h +133 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_generic_array.h +73 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_wasm32.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/persist.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/camera.h +105 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/cache.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/free_space.h +60 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/operations_cpu.h +411 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/glb/glb.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/glb/operations_cpu.h +1288 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/operations_cpu.h +136 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/catalog.h +232 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/conversion.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/operations_cpu.h +123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/procthor.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_cpu.h +717 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_generic.h +1283 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/context.h +193 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/device_source.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/operations_cpu.h +1123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device.h +207 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device_impl.h +1043 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/operations_cuda.h +1747 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/overlay_accel.h +64 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/specialization.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/context.h +251 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/device_source.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/operations_cpu.h +2067 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/bvh_sah.h +182 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/context.h +280 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/device_source.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/operations_cpu.h +1405 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_common.h +948 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_mux.h +32 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_post.h +96 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/renderer.h +484 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/save_cpu.h +314 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/scene.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/transforms_generic.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/types.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/operations_cpu.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/operations_generic.h +121 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/rig.h +70 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/scene.h +132 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/segmentation_cpu.h +145 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/transforms.h +204 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/types.h +76 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/algorithms.h +6 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_cpu.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_cpu_mkl.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_generic.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/config.h +243 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_cuda.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_generic.h +205 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/persist.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/state.h +51 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/mixed_imitation.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_cuda.h +190 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic.h +332 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic_mixed_imitation.h +81 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/persist.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/ppo.h +105 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/approximators_gru.h +84 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/approximators_mlp.h +61 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/config.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/operations_generic.h +193 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/state.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_accelerate.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_mkl.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_mux.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cuda.h +131 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_generic.h +580 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/sac.h +151 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/approximators_gru.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/approximators_mlp.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/config.h +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/operations_generic.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/state.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_accelerate.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_mkl.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_mux.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cuda.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_generic.h +359 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/td3.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/components.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/off_policy_runner.h +225 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu.h +95 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu_accelerate.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu_mkl.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cuda.h +237 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_generic.h +498 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_generic_per_env.h +112 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/collection.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/on_policy_runner.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_accelerate.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_mkl.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_mux.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cuda.h +183 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic.h +366 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic_common.h +74 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/persist.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu_accelerate.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu_mkl.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_generic.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/operations_cpu.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/operations_generic.h +123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/persist.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/replay_buffer.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/operations_generic.h +76 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/persist.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/running_normalizer.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/operations_generic.h +58 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/scale_observations/operations_generic.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/scale_observations/wrapper.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/wrappers.h +29 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/acrobot.h +88 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/operations_cpu.h +152 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/operations_generic.h +202 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/environment.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_cuda.h +204 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_generic.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_generic_common.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/persist.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/car.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_cpu.h +110 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_generic.h +206 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_json.h +59 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/track.h +23 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/ui.h +189 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/environments.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/environment.h +87 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/operations_cpu.h +212 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/operations_generic.h +215 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/observation.h +75 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/operations_cpu.h +1063 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/operations_cuda.h +564 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/pose.h +253 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/presets.h +154 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/raptor/operations_cpu.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/raptor/operations_generic.h +91 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/raptor/raptor.h +71 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/operations_cpu.h +190 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/operations_generic.h +32 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/rig.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/capture_cpu.h +86 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/capture_cuda.h +69 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/capture_optix.h +163 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cpu.h +223 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cpu_spectator.h +194 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cuda.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cuda_spectator.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/spectator.h +82 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/spy.h +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/ui.h +30 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/moving_gate.h +103 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/operations_cpu.h +279 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/operations_cuda.h +242 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_cpu.h +322 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_cuda.h +312 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_generic_position_hold.h +128 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/position_hold.h +22 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/target_frame.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/baseline.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/calibration.h +62 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/metrics.h +101 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/operations_cpu.h +374 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/visual_inertial_localization.h +126 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/world.h +333 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/inertial_velocity.h +27 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/metrics.h +266 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/multirotor.h +1138 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_cpu.h +2252 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/05_state_is_nan.h +148 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/10_sample_initial_parameters.h +228 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/20_initial_state.h +208 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/30_sample_initial_state.h +300 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/35_get_desired_state.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/40_observe.h +637 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/50_state_algebra.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/60_dynamics.h +134 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/70_post_integration.h +368 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/80_abs_diff.h +312 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic.h +367 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic_inertial_velocity.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_helper_generic.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic.h +70 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic_forward.h +24 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/default.h +209 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/arpl.h +112 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/crazyflie.h +127 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/crazyflie_openmv.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/flightmare.h +111 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/fs.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/mrs.h +110 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/soft.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/soft_rigid.h +118 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500.h +88 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500_real.h +88 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500_sim.h +114 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/init/default.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/registry.h +96 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/default.h +64 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/reward_functions.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/squared/operations_generic.h +202 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/squared/squared.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/termination/default.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/trajectories/lissajous.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/trajectories/trajectory.h +78 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/persist.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/persist_code.h +53 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/quaternion_helper.h +103 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/ui.h +180 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/environment.h +69 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/operations_cpu.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/operations_generic.h +78 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/README.MD +5 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/ant.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/model.h +415 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/operations_cpu.h +162 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/persist.h +86 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/ui.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/mujoco.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/bottleneck.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/operations_cpu.h +289 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/operations_generic.h +495 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/environments.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/observation.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/operations_cpu.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/operations_generic.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/operations_cpu.h +146 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/operations_generic.h +262 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/pendulum.h +197 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/ui.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/ui_xeus.h +124 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/operations_cpu.h +426 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/operations_generic.h +424 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/reacher.h +137 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/loop.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/config.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/operations_cpu.h +233 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/persist.h +30 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/state.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/config.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/operations_generic.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/state.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/config.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/operations_generic.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/persist.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/state.h +36 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/config.h +22 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/operations_cpu.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/state.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/config.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/operations_cpu.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/state.h +24 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/config.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/operations_cpu.h +190 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/persist.h +30 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/state.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/steps.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/config.h +27 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/operations_cpu.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/state.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/operations_generic.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/rl.h +5 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/evaluation.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/operations_cpu.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/operations_generic.h +275 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/validation.h +269 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/validation_analysis.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl_tools.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/client.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_boost.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_cpu.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_websocket.h +208 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/server.h +448 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/universe.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/declarations_cpu.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/declarations_cpu_emscripten.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_arm.h +29 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cpu.h +24 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cpu_emscripten.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cuda.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_dummy.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_esp32.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_generic.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_wasm32.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/env/operations_cpu.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/env/operations_generic.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/extrack/extrack.h +129 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/extrack/operations_cpu.h +588 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/integrators.h +103 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/memcpy.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/tuple/operations_generic.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/tuple/tuple.h +147 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/typing.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/vector_operations.h +172 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/polyak/operations_cuda.h +53 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/polyak/operations_generic.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/string/operations_generic.h +201 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/zlib/operations_cpu.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/version.h +28 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/CMakeLists.txt +15 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/README.md +214 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/CMakeLists.txt +11 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/generic/CMakeLists.txt +17 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/generic/freestanding_check.cpp +134 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/CMakeLists.txt +31 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/device.metal +912 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/metal_cpp_impl.cpp +6 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/CMakeLists.txt +51 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/device.cu +1 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/overlay_accel.cu +308 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/CMakeLists.txt +37 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/device.comp +970 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/device_spirv.cpp +44 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/webgpu/CMakeLists.txt +31 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/webgpu/device.wgsl +1381 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/CMakeLists.txt +129 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/README.md +131 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark.cpp +180 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark_dynamic.cpp +491 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/download_paper_scene.py +74 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/CMakeLists.txt +104 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/Info.plist +36 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/Sources/BenchmarkApp.swift +172 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/benchmark.h +10 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/benchmark.mm +46 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/build.sh +17 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/rig.cpp +119 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix.cpp +1382 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix.h +5 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_config.h.in +25 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_identity.cmake +11 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_main.cpp +5 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics.cu +125 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics.h +58 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics_contract.h +179 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics_cpu.cpp +77 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/camera_orbit.h +51 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/CMakeLists.txt +199 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/antialiasing.cpp +214 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone.cpp +320 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone_device.cu +359 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/environment.h +96 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/operations_cpu.h +263 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/example.cpp +273 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/fixed_pose.cpp +221 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/flow.cpp +120 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/interactive.cpp +1015 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/make_drone_glb.py +172 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/minimal.cpp +82 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/minimal_overlay.cpp +137 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/motion_blur.cpp +232 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/render_pose_trace.cpp +1829 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/render_pose_trace_motion_blur.cpp +647 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/CMakeLists.txt +147 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/README.md +15 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/job.sbatch +28 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model.h +260 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_config.h +24 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_forward_cuda.h +397 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_operations.h +418 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_persist.h +45 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_student.h +70 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/scene.cpp +222 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/scene.h +68 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/.gitignore +4 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/CMakeLists.txt +4 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Info.plist +24 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Info_ios.plist +36 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/CameraManager.swift +120 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/ContentView.swift +703 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/DatasetRecorder.swift +285 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/YawPredictorApp.swift +25 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/YawPredictor.entitlements +8 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/build.sh +66 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/build_ios.sh +133 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/generate.sh +6 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/h5_to_tar.cpp +82 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/inference.cpp +166 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/inference.h +26 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/project.yml +30 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/test_tar_vs_hdf5.cpp +173 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_cuda.cu +699 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_dataset_overlay.cpp +475 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_distill_cuda.cu +995 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_eval.cu +457 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_real_world_eval.cpp +660 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_viewer.cu +443 -0
- hyperdrone/_vendor/rl-tools/src/rl/environments/hyperdrone/spy/CMakeLists.txt +63 -0
- hyperdrone/_vendor/rl-tools/src/rl/environments/hyperdrone/spy/example.cpp +101 -0
- hyperdrone/_vendor/rl-tools/src/rl/environments/hyperdrone/spy/ui.cpp +380 -0
- hyperdrone/dynamics/__init__.py +5 -0
- hyperdrone/dynamics/_component.py +31 -0
- hyperdrone/dynamics/_config.py +46 -0
- hyperdrone/dynamics/_sim.py +166 -0
- hyperdrone/env/__init__.py +23 -0
- hyperdrone/env/_multi_environment.py +566 -0
- hyperdrone/env/_rotorcraft.py +29 -0
- hyperdrone/env/_spy.py +39 -0
- hyperdrone/examples/.gitignore +3 -0
- hyperdrone/examples/Benchmark.ipynb +113 -0
- hyperdrone/examples/HyperDrone.ipynb +589 -0
- hyperdrone/examples/Orbiter.ipynb +496 -0
- hyperdrone/examples/Renderer.ipynb +218 -0
- hyperdrone/examples/__init__.py +16 -0
- hyperdrone/examples/articulation.py +55 -0
- hyperdrone/examples/benchmark.py +236 -0
- hyperdrone/examples/benchmark_minimal.py +65 -0
- hyperdrone/examples/data.py +71 -0
- hyperdrone/examples/drone_flythrough.py +169 -0
- hyperdrone/examples/hyperdrone_videos/my_world_preview.h +17 -0
- hyperdrone/examples/my_world.h +17 -0
- hyperdrone/examples/render_procthor.py +40 -0
- hyperdrone/examples/shots.py +108 -0
- hyperdrone/examples/spy.py +40 -0
- hyperdrone/examples/visual_inertial_localization.py +158 -0
- hyperdrone/gym/__init__.py +67 -0
- hyperdrone/render/__init__.py +57 -0
- hyperdrone/render/_component.py +51 -0
- hyperdrone/render/_config.py +76 -0
- hyperdrone/render/_renderer.py +498 -0
- hyperdrone/render/_rig.py +136 -0
- hyperdrone/render/_sampling.py +69 -0
- hyperdrone/render/_scene.py +38 -0
- hyperdrone/render/datasets.py +15 -0
- hyperray-0.0.1.dist-info/METADATA +519 -0
- hyperray-0.0.1.dist-info/RECORD +788 -0
- hyperray-0.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
#include "../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_MODELS_MULTI_AGENT_WRAPPER_MODEL_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_MODELS_MULTI_AGENT_WRAPPER_MODEL_H
|
|
5
|
+
|
|
6
|
+
#include "../../nn/nn.h"
|
|
7
|
+
#include "../../nn_models/sequential/model.h"
|
|
8
|
+
#include "../../nn/parameters/parameters.h"
|
|
9
|
+
#include "../../nn/optimizers/sgd/sgd.h"
|
|
10
|
+
#include "../../nn/optimizers/adam/adam.h"
|
|
11
|
+
#include "../../utils/generic/typing.h"
|
|
12
|
+
#include "../../containers/matrix/matrix.h"
|
|
13
|
+
|
|
14
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
15
|
+
namespace rl_tools::nn_models::multi_agent_wrapper {
|
|
16
|
+
template <typename T_TYPE_POLICY, typename T_TI, T_TI T_N_AGENTS, typename T_MODULE>
|
|
17
|
+
struct Configuration{
|
|
18
|
+
using TYPE_POLICY = T_TYPE_POLICY;
|
|
19
|
+
using TI = T_TI;
|
|
20
|
+
static constexpr TI N_AGENTS = T_N_AGENTS;
|
|
21
|
+
using MODULE = T_MODULE;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// template <typename T_T, typename T_TI, T_TI T_N_AGENTS, typename T_MODULE>
|
|
25
|
+
// using SpecificationFixedModule = Specification<T_T, T_TI, T_N_AGENTS, BindModule<T_MODULE>::template Module>;
|
|
26
|
+
|
|
27
|
+
template <typename T_CONFIG, typename T_CAPABILITY, typename T_INPUT_SHAPE>
|
|
28
|
+
struct Specification: T_CAPABILITY, T_CONFIG{
|
|
29
|
+
using TYPE_POLICY = typename T_CONFIG::TYPE_POLICY;
|
|
30
|
+
using TI = typename T_CONFIG::TI;
|
|
31
|
+
using CONFIG = T_CONFIG;
|
|
32
|
+
using CAPABILITY = T_CAPABILITY;
|
|
33
|
+
|
|
34
|
+
using PARAMETER_TYPE = typename CAPABILITY::PARAMETER_TYPE;
|
|
35
|
+
|
|
36
|
+
static constexpr TI INPUT_DIM = get_last(T_INPUT_SHAPE{});
|
|
37
|
+
static constexpr TI BATCH_AXIS = length(T_INPUT_SHAPE{})-2;
|
|
38
|
+
static constexpr TI BATCH_SIZE = get<BATCH_AXIS>(T_INPUT_SHAPE{});
|
|
39
|
+
static_assert(INPUT_DIM % CONFIG::N_AGENTS == 0, "The input dimension must be divisible by the number of agents");
|
|
40
|
+
static constexpr TI PER_AGENT_INPUT_DIM = INPUT_DIM / CONFIG::N_AGENTS;
|
|
41
|
+
static constexpr TI INTERNAL_BATCH_SIZE = get<0>(tensor::CumulativeProduct<tensor::PopBack<T_INPUT_SHAPE>>{}) * CONFIG::N_AGENTS; // Since the Dense layer is based on Matrices (2D Tensors) the dense layer operation is broadcasted over the leading dimensions. Hence, the actual batch size is the product of all leading dimensions, excluding the last one (containing the features). Since rl_tools::matrix_view is used for zero-cost conversion the INTERNAL_BATCH_SIZE accounts for all leading dimensions.
|
|
42
|
+
using INPUT_SHAPE = T_INPUT_SHAPE;
|
|
43
|
+
using INTERNAL_INPUT_SHAPE_TEMP = tensor::Replace<T_INPUT_SHAPE, PER_AGENT_INPUT_DIM, length(T_INPUT_SHAPE{})-1>;
|
|
44
|
+
using INTERNAL_INPUT_SHAPE = tensor::Replace<INTERNAL_INPUT_SHAPE_TEMP, INTERNAL_BATCH_SIZE, BATCH_AXIS>;
|
|
45
|
+
using MODEL = nn_models::sequential::Build<CAPABILITY, typename CONFIG::MODULE, INTERNAL_INPUT_SHAPE>;
|
|
46
|
+
static constexpr TI PER_AGENT_OUTPUT_DIM = get_last(typename MODEL::OUTPUT_SHAPE{});
|
|
47
|
+
static constexpr TI OUTPUT_DIM = PER_AGENT_OUTPUT_DIM * CONFIG::N_AGENTS;
|
|
48
|
+
using OUTPUT_SHAPE = tensor::Replace<INPUT_SHAPE, OUTPUT_DIM, length(typename MODEL::INPUT_SHAPE{})-1>;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
template <typename T_SPEC, bool T_DYNAMIC_ALLOCATION=true>
|
|
52
|
+
struct ModuleStateSpecification{
|
|
53
|
+
using SPEC = T_SPEC;
|
|
54
|
+
static constexpr bool DYNAMIC_ALLOCATION = T_DYNAMIC_ALLOCATION;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
template<typename T_SPEC>
|
|
58
|
+
struct ModuleState{
|
|
59
|
+
using STATE_SPEC = T_SPEC;
|
|
60
|
+
using SPEC = typename STATE_SPEC::SPEC;
|
|
61
|
+
|
|
62
|
+
using INNER_STATE = typename SPEC::MODEL::template State<SPEC::DYNAMIC_ALLOCATION>;
|
|
63
|
+
INNER_STATE inner_state;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
template<typename T_SPEC, typename T_MODEL, bool T_DYNAMIC_ALLOCATION=true>
|
|
67
|
+
struct ModuleBuffersSpecification{
|
|
68
|
+
using SPEC = T_SPEC;
|
|
69
|
+
using TI = typename SPEC::TI;
|
|
70
|
+
static constexpr TI BATCH_SIZE = SPEC::BATCH_SIZE;
|
|
71
|
+
using MODEL = T_MODEL;
|
|
72
|
+
static constexpr bool DYNAMIC_ALLOCATION = T_DYNAMIC_ALLOCATION;
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
template<typename T_BUFFER_SPEC>
|
|
76
|
+
struct ModuleBuffer{
|
|
77
|
+
using BUFFER_SPEC = T_BUFFER_SPEC;
|
|
78
|
+
using SPEC = typename BUFFER_SPEC::SPEC;
|
|
79
|
+
using TYPE_POLICY = typename SPEC::TYPE_POLICY;
|
|
80
|
+
using TI = typename SPEC::TI;
|
|
81
|
+
static constexpr TI BATCH_SIZE = T_BUFFER_SPEC::BATCH_SIZE;
|
|
82
|
+
static constexpr TI INNER_BATCH_SIZE = BATCH_SIZE * SPEC::N_AGENTS;
|
|
83
|
+
|
|
84
|
+
using T_INPUT = typename TYPE_POLICY::template GET<numeric_types::categories::Input>;
|
|
85
|
+
using T_OUTPUT = typename TYPE_POLICY::template GET<numeric_types::categories::Accumulator>;
|
|
86
|
+
|
|
87
|
+
using INPUT_BUFFER_SPEC = tensor::Specification<T_INPUT, TI, tensor::Shape<TI, 1, BATCH_SIZE, SPEC::INPUT_DIM>, BUFFER_SPEC::DYNAMIC_ALLOCATION>;
|
|
88
|
+
using INPUT_BUFFER_TYPE = Tensor<INPUT_BUFFER_SPEC>;
|
|
89
|
+
using OUTPUT_BUFFER_SPEC = tensor::Specification<T_OUTPUT, TI, tensor::Shape<TI, 1, BATCH_SIZE, SPEC::OUTPUT_DIM>, BUFFER_SPEC::DYNAMIC_ALLOCATION>;
|
|
90
|
+
using OUTPUT_BUFFER_TYPE = Tensor<OUTPUT_BUFFER_SPEC>;
|
|
91
|
+
INPUT_BUFFER_TYPE input, d_input;
|
|
92
|
+
OUTPUT_BUFFER_TYPE output;
|
|
93
|
+
|
|
94
|
+
typename BUFFER_SPEC::MODEL::template Buffer<BUFFER_SPEC::DYNAMIC_ALLOCATION> buffer;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
template<typename T_SPEC>
|
|
98
|
+
struct ModuleForward{
|
|
99
|
+
using SPEC = T_SPEC;
|
|
100
|
+
using TYPE_POLICY = typename SPEC::TYPE_POLICY;
|
|
101
|
+
using TI = typename SPEC::TI;
|
|
102
|
+
using MODEL = typename SPEC::MODEL;
|
|
103
|
+
static constexpr TI N_AGENTS = SPEC::N_AGENTS;
|
|
104
|
+
using INPUT_SHAPE = typename SPEC::INPUT_SHAPE;
|
|
105
|
+
using OUTPUT_SHAPE = typename SPEC::OUTPUT_SHAPE;
|
|
106
|
+
MODEL content;
|
|
107
|
+
template <bool DYNAMIC_ALLOCATION=true>
|
|
108
|
+
using State = ModuleState<ModuleStateSpecification<SPEC, DYNAMIC_ALLOCATION>>;
|
|
109
|
+
template<bool DYNAMIC_ALLOCATION=true>
|
|
110
|
+
using Buffer = ModuleBuffer<ModuleBuffersSpecification<SPEC, MODEL, DYNAMIC_ALLOCATION>>;
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
template<typename SPEC>
|
|
114
|
+
struct ModuleBackward: public ModuleForward<SPEC>{
|
|
115
|
+
// static constexpr typename SPEC::TI BATCH_SIZE = SPEC::BATCH_SIZE;
|
|
116
|
+
};
|
|
117
|
+
template<typename T_SPEC>
|
|
118
|
+
struct ModuleGradient: public ModuleBackward<T_SPEC>{
|
|
119
|
+
using TI = typename T_SPEC::TI;
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
template <typename T_CAPABILITY, typename T_SPEC>
|
|
123
|
+
using UpgradeCapabilityBatchSize = typename T_CAPABILITY::template CHANGE_BATCH_SIZE<T_CAPABILITY::BATCH_SIZE*T_SPEC::N_AGENTS>;
|
|
124
|
+
|
|
125
|
+
template<typename CONFIG, typename CAPABILITY, typename INPUT_SHAPE>
|
|
126
|
+
using Module =
|
|
127
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Forward, ModuleForward<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>,
|
|
128
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Backward, ModuleBackward<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>,
|
|
129
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Gradient, ModuleGradient<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>, void>>>;
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
template <typename CAPABILITY, typename CONFIG, typename INPUT_SHAPE>
|
|
133
|
+
struct Build: Module<CONFIG, CAPABILITY, INPUT_SHAPE>{
|
|
134
|
+
template <typename TI, TI BATCH_SIZE>
|
|
135
|
+
struct CHANGE_BATCH_SIZE_IMPL{
|
|
136
|
+
using NEW_INPUT_SHAPE = tensor::Replace<INPUT_SHAPE, BATCH_SIZE, 1>;
|
|
137
|
+
using CHANGE_BATCH_SIZE = Build<CAPABILITY, CONFIG, NEW_INPUT_SHAPE>;
|
|
138
|
+
};
|
|
139
|
+
template <typename TI, TI BATCH_SIZE>
|
|
140
|
+
using CHANGE_BATCH_SIZE = typename CHANGE_BATCH_SIZE_IMPL<TI, BATCH_SIZE>::CHANGE_BATCH_SIZE;
|
|
141
|
+
template <typename NEW_CAPABILITY>
|
|
142
|
+
using CHANGE_CAPABILITY = Build<NEW_CAPABILITY, CONFIG, INPUT_SHAPE>;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
}
|
|
147
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
148
|
+
#endif
|
hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/operations_generic.h
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
#include "../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_MODELS_MULTI_AGENT_WRAPPER_OPERATIONS_GENERIC_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_MODELS_MULTI_AGENT_WRAPPER_OPERATIONS_GENERIC_H
|
|
5
|
+
|
|
6
|
+
#include "model.h"
|
|
7
|
+
#include "../../utils/generic/typing.h"
|
|
8
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
9
|
+
namespace rl_tools{
|
|
10
|
+
template <typename DEVICE, typename MODULE_SPEC>
|
|
11
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& module){
|
|
12
|
+
malloc(device, module.content);
|
|
13
|
+
}
|
|
14
|
+
template <typename DEVICE, typename MODULE_SPEC>
|
|
15
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& module){
|
|
16
|
+
free(device, module.content);
|
|
17
|
+
}
|
|
18
|
+
template <typename DEVICE, typename STATE_SPEC>
|
|
19
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn_models::multi_agent_wrapper::ModuleState<STATE_SPEC>& state){
|
|
20
|
+
malloc(device, state.inner_state);
|
|
21
|
+
}
|
|
22
|
+
template <typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
23
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, nn_models::multi_agent_wrapper::ModuleState<SOURCE_SPEC>& source, nn_models::multi_agent_wrapper::ModuleState<TARGET_SPEC>& target){
|
|
24
|
+
copy(source_device, target_device, source.inner_state, target.inner_state);
|
|
25
|
+
}
|
|
26
|
+
template <typename DEVICE, typename MODULE_SPEC, typename STATE_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
27
|
+
RL_TOOLS_FUNCTION_PLACEMENT void reset(DEVICE& device, const nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& model, nn_models::multi_agent_wrapper::ModuleState<STATE_SPEC>& state, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
28
|
+
reset(device, model.content, state.inner_state, rng, mode);
|
|
29
|
+
}
|
|
30
|
+
template <typename DEVICE, typename STATE_SPEC>
|
|
31
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn_models::multi_agent_wrapper::ModuleState<STATE_SPEC>& state){
|
|
32
|
+
free(device, state.inner_state);
|
|
33
|
+
}
|
|
34
|
+
template <typename DEVICE, typename BUFFER_SPEC>
|
|
35
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC>& buffer){
|
|
36
|
+
malloc(device, buffer.input);
|
|
37
|
+
malloc(device, buffer.d_input);
|
|
38
|
+
malloc(device, buffer.output);
|
|
39
|
+
malloc(device, buffer.buffer);
|
|
40
|
+
}
|
|
41
|
+
template <typename DEVICE, typename BUFFER_SPEC>
|
|
42
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC>& buffer){
|
|
43
|
+
free(device, buffer.input);
|
|
44
|
+
free(device, buffer.d_input);
|
|
45
|
+
free(device, buffer.output);
|
|
46
|
+
free(device, buffer.buffer);
|
|
47
|
+
}
|
|
48
|
+
template <typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_BUFFER_SPEC, typename TARGET_BUFFER_SPEC>
|
|
49
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, nn_models::multi_agent_wrapper::ModuleBuffer<SOURCE_BUFFER_SPEC>& source, nn_models::multi_agent_wrapper::ModuleBuffer<TARGET_BUFFER_SPEC>& target){
|
|
50
|
+
copy(source_device, target_device, source.buffer, target.buffer);
|
|
51
|
+
}
|
|
52
|
+
template <typename DEVICE, typename MODULE_SPEC, typename RNG>
|
|
53
|
+
RL_TOOLS_FUNCTION_PLACEMENT void init_weights(DEVICE& device, nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& module, RNG& rng){
|
|
54
|
+
init_weights(device, module.content, rng);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
template <typename MODULE_SPEC> // non-const
|
|
58
|
+
RL_TOOLS_FUNCTION_PLACEMENT constexpr auto& get_first_layer(nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& model){
|
|
59
|
+
return get_first_layer(model.content);
|
|
60
|
+
}
|
|
61
|
+
template <typename MODULE_SPEC> // const
|
|
62
|
+
RL_TOOLS_FUNCTION_PLACEMENT constexpr auto& get_first_layer(const nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& model){
|
|
63
|
+
return get_first_layer(model.content);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
template <typename MODULE_SPEC> // non-const
|
|
67
|
+
RL_TOOLS_FUNCTION_PLACEMENT constexpr auto& get_last_layer(nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& model){
|
|
68
|
+
return get_last_layer(model.content);
|
|
69
|
+
}
|
|
70
|
+
template <typename MODULE_SPEC> // const
|
|
71
|
+
RL_TOOLS_FUNCTION_PLACEMENT constexpr auto& get_last_layer(const nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& model){
|
|
72
|
+
return get_last_layer(model.content);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
template <typename BUFFER_SPEC> // non-const
|
|
76
|
+
RL_TOOLS_FUNCTION_PLACEMENT constexpr auto& get_last_buffer(nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC>& buffer){
|
|
77
|
+
return get_last_buffer(buffer.buffer);
|
|
78
|
+
}
|
|
79
|
+
template <typename BUFFER_SPEC> // const
|
|
80
|
+
RL_TOOLS_FUNCTION_PLACEMENT constexpr auto& get_last_buffer(const nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC>& buffer){
|
|
81
|
+
return get_last_buffer(buffer.buffer);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
template <typename DEVICE, typename SPEC> // non-const
|
|
85
|
+
RL_TOOLS_FUNCTION_PLACEMENT constexpr auto output(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<SPEC>& m){
|
|
86
|
+
auto output_reshaped = reshape_row_major(device, output(device, m.content), typename SPEC::OUTPUT_SHAPE{});
|
|
87
|
+
return output_reshaped;
|
|
88
|
+
}
|
|
89
|
+
template <typename DEVICE, typename SPEC> // const
|
|
90
|
+
RL_TOOLS_FUNCTION_PLACEMENT constexpr auto output(DEVICE& device, const nn_models::multi_agent_wrapper::ModuleGradient<SPEC>& m){
|
|
91
|
+
auto output_reshaped = reshape_row_major(device, output(device, m.content), typename SPEC::OUTPUT_SHAPE{});
|
|
92
|
+
return output_reshaped;
|
|
93
|
+
}
|
|
94
|
+
template<typename DEVICE, typename MODULE_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename BUFFER_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
95
|
+
RL_TOOLS_FUNCTION_PLACEMENT void evaluate(DEVICE& device, const nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& model, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC>& buffers, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
96
|
+
using TI = typename DEVICE::index_t;
|
|
97
|
+
static_assert(INPUT_SPEC::SHAPE::LENGTH == 3);
|
|
98
|
+
static_assert(OUTPUT_SPEC::SHAPE::LENGTH == 3);
|
|
99
|
+
constexpr TI INPUT_DIM = INPUT_SPEC::SHAPE::template GET<INPUT_SPEC::SHAPE::LENGTH-1>;
|
|
100
|
+
constexpr TI OUTPUT_DIM = OUTPUT_SPEC::SHAPE::template GET<OUTPUT_SPEC::SHAPE::LENGTH-1>;
|
|
101
|
+
static_assert(INPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
102
|
+
static_assert(OUTPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
103
|
+
constexpr TI BATCH_AXIS = 1;
|
|
104
|
+
constexpr TI BATCH_SIZE = INPUT_SPEC::SHAPE::template GET<BATCH_AXIS>;
|
|
105
|
+
|
|
106
|
+
auto input_buffer_view = view_range(device, buffers.input, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
107
|
+
auto output_buffer_view = view_range(device, buffers.output, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
108
|
+
copy(device, device, input, input_buffer_view);// forgot why this? to make it dense for the reshape?
|
|
109
|
+
auto input_inner = reshape_row_major(device, input_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, INPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
110
|
+
auto output_inner = reshape_row_major(device, output_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, OUTPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
111
|
+
evaluate(device, model.content, input_inner, output_inner, buffers.buffer, rng, mode);
|
|
112
|
+
copy(device, device, output_buffer_view, output);
|
|
113
|
+
}
|
|
114
|
+
template<typename DEVICE, typename MODULE_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename STATE_SPEC, typename BUFFER_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
115
|
+
RL_TOOLS_FUNCTION_PLACEMENT void evaluate_step(DEVICE& device, const nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& model, const Tensor<INPUT_SPEC>& input, nn_models::multi_agent_wrapper::ModuleState<STATE_SPEC>& state, Tensor<OUTPUT_SPEC>& output, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC>& buffers, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
116
|
+
using TI = typename DEVICE::index_t;
|
|
117
|
+
static_assert(INPUT_SPEC::SHAPE::LENGTH == 2);
|
|
118
|
+
static_assert(OUTPUT_SPEC::SHAPE::LENGTH == 2);
|
|
119
|
+
constexpr TI INPUT_DIM = INPUT_SPEC::SHAPE::template GET<INPUT_SPEC::SHAPE::LENGTH-1>;
|
|
120
|
+
constexpr TI OUTPUT_DIM = OUTPUT_SPEC::SHAPE::template GET<OUTPUT_SPEC::SHAPE::LENGTH-1>;
|
|
121
|
+
static_assert(INPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
122
|
+
static_assert(OUTPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
123
|
+
constexpr TI BATCH_AXIS = 0;
|
|
124
|
+
constexpr TI BATCH_SIZE = INPUT_SPEC::SHAPE::template GET<BATCH_AXIS>;
|
|
125
|
+
using TI = typename DEVICE::index_t;
|
|
126
|
+
|
|
127
|
+
auto input_buffer_step = view(device, buffers.input, 0);
|
|
128
|
+
auto output_buffer_step = view(device, buffers.output, 0);
|
|
129
|
+
auto input_buffer_view = view_range(device, input_buffer_step, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
130
|
+
auto output_buffer_view = view_range(device, output_buffer_step, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
131
|
+
copy(device, device, input, input_buffer_view);
|
|
132
|
+
auto input_inner = reshape_row_major(device, input_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, INPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
133
|
+
auto output_inner = reshape_row_major(device, output_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, OUTPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
134
|
+
evaluate_step(device, model.content, input_inner, state.inner_state, output_inner, buffers.buffer, rng, mode);
|
|
135
|
+
copy(device, device, output_buffer_view, output);
|
|
136
|
+
}
|
|
137
|
+
template <typename DEVICE, typename MODULE_SPEC, typename INPUT_SPEC, typename BUFFER_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
138
|
+
RL_TOOLS_FUNCTION_PLACEMENT void forward(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<MODULE_SPEC>& module, const Tensor<INPUT_SPEC>& input, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC>& buffers, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
139
|
+
using TI = typename DEVICE::index_t;
|
|
140
|
+
static_assert(INPUT_SPEC::SHAPE::LENGTH == 3);
|
|
141
|
+
constexpr TI INPUT_DIM = INPUT_SPEC::SHAPE::template GET<INPUT_SPEC::SHAPE::LENGTH-1>;
|
|
142
|
+
static_assert(INPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
143
|
+
constexpr TI BATCH_AXIS = 1;
|
|
144
|
+
constexpr TI BATCH_SIZE = INPUT_SPEC::SHAPE::template GET<BATCH_AXIS>;
|
|
145
|
+
using TI = typename DEVICE::index_t;
|
|
146
|
+
|
|
147
|
+
auto input_buffer_view = view_range(device, buffers.input, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
148
|
+
auto output_buffer_view = view_range(device, buffers.output, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
149
|
+
copy(device, device, input, input_buffer_view);
|
|
150
|
+
auto input_inner = reshape_row_major(device, input_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, INPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
151
|
+
forward(device, module.content, input_inner, buffers.buffer, rng, mode);
|
|
152
|
+
}
|
|
153
|
+
template <typename DEVICE, typename MODULE_SPEC, typename INPUT, typename OUTPUT, typename BUFFER_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
154
|
+
RL_TOOLS_FUNCTION_PLACEMENT void forward(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<MODULE_SPEC>& module, INPUT& input, OUTPUT& output, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC>& buffers, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
155
|
+
forward(device, module, input, buffers, rng, mode);
|
|
156
|
+
auto module_output = rl_tools::output(device, module);
|
|
157
|
+
copy(device, device, module_output, output);
|
|
158
|
+
}
|
|
159
|
+
template <typename DEVICE, typename MODULE_SPEC>
|
|
160
|
+
RL_TOOLS_FUNCTION_PLACEMENT void zero_gradient(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<MODULE_SPEC>& module){
|
|
161
|
+
zero_gradient(device, module.content);
|
|
162
|
+
}
|
|
163
|
+
template<typename DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
164
|
+
RL_TOOLS_FUNCTION_PLACEMENT void add_gradient(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<SOURCE_SPEC>& source, nn_models::multi_agent_wrapper::ModuleGradient<TARGET_SPEC>& target) {
|
|
165
|
+
add_gradient(device, source.content, target.content);
|
|
166
|
+
}
|
|
167
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
168
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy_gradient(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, const nn_models::multi_agent_wrapper::ModuleGradient<SOURCE_SPEC>& source, nn_models::multi_agent_wrapper::ModuleGradient<TARGET_SPEC>& target) {
|
|
169
|
+
copy_gradient(source_device, target_device, source.content, target.content);
|
|
170
|
+
}
|
|
171
|
+
template<typename DEVICE, typename SPEC, typename OPTIMIZER>
|
|
172
|
+
RL_TOOLS_FUNCTION_PLACEMENT void _reset_optimizer_state(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<SPEC>& module, OPTIMIZER& optimizer) {
|
|
173
|
+
_reset_optimizer_state(device, module.content, optimizer);
|
|
174
|
+
}
|
|
175
|
+
template<typename DEVICE, typename SPEC>
|
|
176
|
+
RL_TOOLS_FUNCTION_PLACEMENT void reset_forward_state(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<SPEC>& module) {
|
|
177
|
+
reset_forward_state(device, module.content);
|
|
178
|
+
}
|
|
179
|
+
template<typename DEVICE, typename MODULE_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename D_INPUT_SPEC, typename BUFFER_SPEC, typename MODE = mode::Default<>>
|
|
180
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward_full(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<MODULE_SPEC>& model, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, Tensor<D_INPUT_SPEC>& d_input, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC> buffers, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
181
|
+
using TI = typename DEVICE::index_t;
|
|
182
|
+
static_assert(INPUT_SPEC::SHAPE::LENGTH == 3);
|
|
183
|
+
static_assert(D_INPUT_SPEC::SHAPE::LENGTH == 3);
|
|
184
|
+
static_assert(D_OUTPUT_SPEC::SHAPE::LENGTH == 3);
|
|
185
|
+
constexpr TI INPUT_DIM = INPUT_SPEC::SHAPE::template GET<INPUT_SPEC::SHAPE::LENGTH-1>;
|
|
186
|
+
static_assert(INPUT_DIM == D_INPUT_SPEC::SHAPE::template GET<D_INPUT_SPEC::SHAPE::LENGTH-1>);
|
|
187
|
+
constexpr TI OUTPUT_DIM = D_OUTPUT_SPEC::SHAPE::template GET<D_OUTPUT_SPEC::SHAPE::LENGTH-1>;
|
|
188
|
+
static_assert(INPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
189
|
+
static_assert(OUTPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
190
|
+
constexpr TI BATCH_AXIS = 1;
|
|
191
|
+
constexpr TI BATCH_SIZE = INPUT_SPEC::SHAPE::template GET<BATCH_AXIS>;
|
|
192
|
+
static_assert(BATCH_SIZE == D_INPUT_SPEC::SHAPE::template GET<BATCH_AXIS>);
|
|
193
|
+
static_assert(BATCH_SIZE == D_OUTPUT_SPEC::SHAPE::template GET<BATCH_AXIS>);
|
|
194
|
+
using TI = typename DEVICE::index_t;
|
|
195
|
+
|
|
196
|
+
auto input_buffer_view = view_range(device, buffers.input, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
197
|
+
auto d_input_buffer_view = view_range(device, buffers.d_input, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
198
|
+
auto d_output_buffer_view = view_range(device, buffers.output, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
199
|
+
copy(device, device, input, input_buffer_view);
|
|
200
|
+
copy(device, device, d_output, d_output_buffer_view);
|
|
201
|
+
auto input_inner = reshape_row_major(device, input_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, INPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
202
|
+
auto d_input_inner = reshape_row_major(device, d_input_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, INPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
203
|
+
auto d_output_inner = reshape_row_major(device, d_output_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, OUTPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
204
|
+
backward_full(device, model.content, input_inner, d_output_inner, d_input_inner, buffers.buffer, mode);
|
|
205
|
+
copy(device, device, d_input_buffer_view, d_input);
|
|
206
|
+
}
|
|
207
|
+
template<typename DEVICE, typename MODULE_SPEC, typename D_OUTPUT_SPEC, typename D_INPUT_SPEC, typename BUFFER_SPEC, typename MODE = mode::Default<>>
|
|
208
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward_input(DEVICE& device, nn_models::multi_agent_wrapper::ModuleBackward<MODULE_SPEC>& model, Tensor<D_OUTPUT_SPEC>& d_output, Tensor<D_INPUT_SPEC>& d_input, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC> buffers, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
209
|
+
using TI = typename DEVICE::index_t;
|
|
210
|
+
static_assert(D_INPUT_SPEC::SHAPE::LENGTH == 3);
|
|
211
|
+
static_assert(D_OUTPUT_SPEC::SHAPE::LENGTH == 3);
|
|
212
|
+
constexpr TI INPUT_DIM = D_INPUT_SPEC::SHAPE::template GET<D_INPUT_SPEC::SHAPE::LENGTH-1>;
|
|
213
|
+
constexpr TI OUTPUT_DIM = D_OUTPUT_SPEC::SHAPE::template GET<D_OUTPUT_SPEC::SHAPE::LENGTH-1>;
|
|
214
|
+
static_assert(INPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
215
|
+
static_assert(OUTPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
216
|
+
constexpr TI BATCH_AXIS = 1;
|
|
217
|
+
constexpr TI BATCH_SIZE = D_INPUT_SPEC::SHAPE::template GET<BATCH_AXIS>;
|
|
218
|
+
static_assert(BATCH_SIZE == D_OUTPUT_SPEC::SHAPE::template GET<BATCH_AXIS>);
|
|
219
|
+
using TI = typename DEVICE::index_t;
|
|
220
|
+
|
|
221
|
+
auto d_input_buffer_view = view_range(device, buffers.d_input, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
222
|
+
auto d_output_buffer_view = view_range(device, buffers.output, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
223
|
+
copy(device, device, d_output, d_output_buffer_view);
|
|
224
|
+
auto d_input_inner = reshape_row_major(device, d_input_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, INPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
225
|
+
auto d_output_inner = reshape_row_major(device, d_output_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, OUTPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
226
|
+
backward_input(device, model.content, d_output_inner, d_input_inner, buffers.buffer, mode);
|
|
227
|
+
copy(device, device, d_input_buffer_view, d_input);
|
|
228
|
+
}
|
|
229
|
+
template<typename DEVICE, typename MODULE_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename BUFFER_SPEC, typename MODE = mode::Default<>>
|
|
230
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<MODULE_SPEC>& model, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC> buffers, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
231
|
+
using TI = typename DEVICE::index_t;
|
|
232
|
+
static_assert(INPUT_SPEC::SHAPE::LENGTH == 3);
|
|
233
|
+
static_assert(D_OUTPUT_SPEC::SHAPE::LENGTH == 3);
|
|
234
|
+
constexpr TI INPUT_DIM = INPUT_SPEC::SHAPE::template GET<INPUT_SPEC::SHAPE::LENGTH-1>;
|
|
235
|
+
constexpr TI OUTPUT_DIM = D_OUTPUT_SPEC::SHAPE::template GET<D_OUTPUT_SPEC::SHAPE::LENGTH-1>;
|
|
236
|
+
static_assert(INPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
237
|
+
static_assert(OUTPUT_DIM % MODULE_SPEC::N_AGENTS == 0);
|
|
238
|
+
constexpr TI BATCH_AXIS = 1;
|
|
239
|
+
constexpr TI BATCH_SIZE = INPUT_SPEC::SHAPE::template GET<BATCH_AXIS>;
|
|
240
|
+
static_assert(BATCH_SIZE == D_OUTPUT_SPEC::SHAPE::template GET<BATCH_AXIS>);
|
|
241
|
+
using TI = typename DEVICE::index_t;
|
|
242
|
+
|
|
243
|
+
auto input_buffer_view = view_range(device, buffers.input, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
244
|
+
auto d_output_buffer_view = view_range(device, buffers.output, tensor::ViewSpec<BATCH_AXIS, BATCH_SIZE>{});
|
|
245
|
+
copy(device, device, input, input_buffer_view);
|
|
246
|
+
copy(device, device, d_output, d_output_buffer_view);
|
|
247
|
+
auto input_inner = reshape_row_major(device, input_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, INPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
248
|
+
auto d_output_inner = reshape_row_major(device, d_output_buffer_view, tensor::Shape<TI, BATCH_SIZE*MODULE_SPEC::N_AGENTS, OUTPUT_DIM/MODULE_SPEC::N_AGENTS>{});
|
|
249
|
+
backward(device, model.content, input_inner, d_output_inner, buffers.buffer, mode);
|
|
250
|
+
}
|
|
251
|
+
template<typename DEVICE, typename SPEC, typename OPTIMIZER>
|
|
252
|
+
RL_TOOLS_FUNCTION_PLACEMENT void update(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<SPEC>& model, OPTIMIZER& optimizer) {
|
|
253
|
+
update(device, model.content, optimizer);
|
|
254
|
+
}
|
|
255
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
256
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, const nn_models::multi_agent_wrapper::ModuleForward<SOURCE_SPEC>& source, nn_models::multi_agent_wrapper::ModuleForward<TARGET_SPEC>& target){
|
|
257
|
+
copy(source_device, target_device, source.content, target.content);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
template<typename DEVICE, typename SPEC_A, typename SPEC_B>
|
|
261
|
+
RL_TOOLS_FUNCTION_PLACEMENT typename SPEC_A::T abs_diff(DEVICE& device, nn_models::multi_agent_wrapper::ModuleForward<SPEC_A>& a, const nn_models::multi_agent_wrapper::ModuleForward<SPEC_B>& b){
|
|
262
|
+
auto diff = abs_diff(device, a.content, b.content);
|
|
263
|
+
return diff;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
template<typename DEVICE, typename MODULE_SPEC>
|
|
268
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE& device, nn_models::multi_agent_wrapper::ModuleForward<MODULE_SPEC>& model){
|
|
269
|
+
bool current_module_nan = is_nan(device, model.content);
|
|
270
|
+
return current_module_nan;
|
|
271
|
+
}
|
|
272
|
+
template<typename DEVICE, typename SPEC, typename MODE = mode::Default<>>
|
|
273
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE& device, nn_models::multi_agent_wrapper::ModuleState<SPEC>& state, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
274
|
+
return is_nan(device, state.inner_state, mode);
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
template <typename DEVICE, typename BUFFER_SPEC, typename RNG>
|
|
278
|
+
RL_TOOLS_FUNCTION_PLACEMENT void sample(DEVICE& device, nn_models::multi_agent_wrapper::ModuleBuffer<BUFFER_SPEC>& buffer, RNG& rng){
|
|
279
|
+
sample(device, buffer.buffer, rng);
|
|
280
|
+
}
|
|
281
|
+
template <typename DEVICE, typename SPEC>
|
|
282
|
+
RL_TOOLS_FUNCTION_PLACEMENT void print(DEVICE& device, const nn_models::multi_agent_wrapper::ModuleForward<SPEC>& model, typename DEVICE::index_t layer_i = 0){
|
|
283
|
+
print(device, model.content, layer_i);
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
287
|
+
|
|
288
|
+
#endif
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
#include "../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_MODELS_MULTI_AGENT_WRAPPER_PERSIST_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_MODELS_MULTI_AGENT_WRAPPER_PERSIST_H
|
|
5
|
+
#include "../../nn/parameters/persist.h"
|
|
6
|
+
#include "../../nn/persist.h"
|
|
7
|
+
#include "model.h"
|
|
8
|
+
|
|
9
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
10
|
+
namespace rl_tools{
|
|
11
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
12
|
+
void save(DEVICE& device, nn_models::multi_agent_wrapper::ModuleForward<SPEC>& model, GROUP& group) {
|
|
13
|
+
auto wrapper_group = create_group(device, group, "multi_agent_wrapper");
|
|
14
|
+
auto content_group = create_group(device, wrapper_group, "content");
|
|
15
|
+
save(device, model.content, content_group);
|
|
16
|
+
}
|
|
17
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
18
|
+
bool load(DEVICE& device, nn_models::multi_agent_wrapper::ModuleForward<SPEC>& model, GROUP& group, typename DEVICE::index_t layer_i = 0) {
|
|
19
|
+
auto wrapper_group = get_group(device, group, "multi_agent_wrapper");
|
|
20
|
+
auto content_group = get_group(device, wrapper_group, "content");
|
|
21
|
+
return load(device, model.content, content_group);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
25
|
+
#endif
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
#include "../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_MODELS_MULTI_AGENT_WRAPPER_PERSIST_CODE_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_MODELS_MULTI_AGENT_WRAPPER_PERSIST_CODE_H
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
#include <string>
|
|
9
|
+
#include <sstream>
|
|
10
|
+
#include "../../persist/code.h"
|
|
11
|
+
#include "model.h"
|
|
12
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
13
|
+
namespace rl_tools{
|
|
14
|
+
template<typename DEVICE, typename SPEC>
|
|
15
|
+
persist::Code save_code_split(DEVICE& device, nn_models::multi_agent_wrapper::ModuleForward<SPEC>& module, std::string name, bool const_declaration=true, typename DEVICE::index_t indent = 0){
|
|
16
|
+
using TI = typename DEVICE::index_t;
|
|
17
|
+
std::stringstream indent_ss;
|
|
18
|
+
for(TI i=0; i < indent; i++){
|
|
19
|
+
indent_ss << " ";
|
|
20
|
+
}
|
|
21
|
+
std::string ind = indent_ss.str();
|
|
22
|
+
std::stringstream ss_header;
|
|
23
|
+
ss_header << "#include <rl_tools/nn_models/multi_agent_wrapper/model.h>\n";
|
|
24
|
+
std::stringstream ss;
|
|
25
|
+
ss << ind << "namespace " << name << " {\n";
|
|
26
|
+
auto content = save_code_split(device, module.content, "content", const_declaration, indent+1);
|
|
27
|
+
ss_header << content.header;
|
|
28
|
+
ss << content.body;
|
|
29
|
+
std::string T_string = containers::persist::get_type_string<typename SPEC::TYPE_POLICY::DEFAULT>();
|
|
30
|
+
std::string TI_string = containers::persist::get_type_string<TI>();
|
|
31
|
+
ss << "\n";
|
|
32
|
+
ss << ind << " using TYPE_POLICY = " << to_string(typename SPEC::TYPE_POLICY{}) << ";\n";
|
|
33
|
+
ss << ind << " using CONFIG = RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::nn_models::multi_agent_wrapper::Configuration<";
|
|
34
|
+
ss << "TYPE_POLICY, ";
|
|
35
|
+
ss << TI_string << ", ";
|
|
36
|
+
ss << std::to_string(SPEC::N_AGENTS) << ", ";
|
|
37
|
+
ss << "content::model_definition::MODULE_CHAIN";
|
|
38
|
+
ss << ">; \n";
|
|
39
|
+
ss << ind << " using CAPABILITY = " << to_string(typename SPEC::CAPABILITY::template CHANGE_PARAMETERS<true, true>{}) << "; \n";
|
|
40
|
+
ss << ind << " using INPUT_SHAPE = RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::tensor::Shape<" << TI_string << ", " << SPEC::INPUT_SHAPE::template GET<0> << ", " << SPEC::INPUT_SHAPE::template GET<1> << ", " << SPEC::INPUT_SHAPE::template GET<2> << ">;\n";
|
|
41
|
+
ss << ind << " using TYPE = RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::nn_models::multi_agent_wrapper::Module<CONFIG, CAPABILITY, INPUT_SHAPE>; \n";
|
|
42
|
+
std::stringstream ss_initializer_list, ss_initializer_list_function;
|
|
43
|
+
ss_initializer_list << "{content::factory<TYPE::MODEL>}";
|
|
44
|
+
ss_initializer_list_function << "{content::factory_function<TYPE::MODEL>()}";
|
|
45
|
+
ss << ind << " " << (const_declaration ? "constexpr " : "") << "TYPE module = " << ss_initializer_list.str() << ";\n";
|
|
46
|
+
ss << ind << " " << "template <typename T_TYPE = TYPE>" << "\n";
|
|
47
|
+
ss << ind << " " << (const_declaration ? "constexpr " : "") << "T_TYPE factory = " << ss_initializer_list.str() << ";" << "\n";
|
|
48
|
+
ss << ind << " " << "template <typename T_TYPE = TYPE>" << "\n";
|
|
49
|
+
ss << ind << " " << (const_declaration ? "constexpr " : "") << "T_TYPE factory_function(){return " << ss_initializer_list_function.str() << ";}\n";
|
|
50
|
+
ss << ind << "}\n";
|
|
51
|
+
return {ss_header.str(), ss.str()};
|
|
52
|
+
}
|
|
53
|
+
template<typename DEVICE, typename SPEC>
|
|
54
|
+
std::string save_code(DEVICE& device, nn_models::multi_agent_wrapper::ModuleForward<SPEC>& module, std::string name, bool const_declaration = true, typename DEVICE::index_t indent = 0) {
|
|
55
|
+
auto code = save_code_split(device, module, name, const_declaration, indent);
|
|
56
|
+
return code.header + code.body;
|
|
57
|
+
}
|
|
58
|
+
template <typename DEVICE, typename SPEC>
|
|
59
|
+
std::string nn_analytics(DEVICE& device, nn_models::multi_agent_wrapper::ModuleGradient<SPEC>& nn) {
|
|
60
|
+
std::string data;
|
|
61
|
+
data += "{";
|
|
62
|
+
data += " \"type\": \"multi_agent_wrapper\",";
|
|
63
|
+
data += " \"inner\": ";
|
|
64
|
+
data += nn_analytics(device, nn.content);
|
|
65
|
+
data += "}";
|
|
66
|
+
return data;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
70
|
+
|
|
71
|
+
#endif
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#include "mlp/operations_cuda.h"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#include "mlp/operations_dummy.h"
|