hyperdrone 0.1.0__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 +28 -0
- hyperdrone/_native/cmake/hyperdrone_jit.cmake +43 -0
- hyperdrone/_native/common/bindings.h +39 -0
- hyperdrone/_native/common/cuda_staging.h +68 -0
- hyperdrone/_native/common/jit_host.h +69 -0
- hyperdrone/_native/dynamics/CMakeLists.txt +66 -0
- hyperdrone/_native/dynamics/host.cpp +191 -0
- hyperdrone/_native/dynamics/iface.h +81 -0
- hyperdrone/_native/dynamics/impl.cpp +659 -0
- hyperdrone/_native/render/CMakeLists.txt +96 -0
- hyperdrone/_native/render/host.cpp +276 -0
- hyperdrone/_native/render/iface.h +132 -0
- hyperdrone/_native/render/impl.cpp +620 -0
- hyperdrone/_native/render/scene_bindings.cpp +279 -0
- hyperdrone/_vendor/rl-tools/CMakeLists.txt +159 -0
- hyperdrone/_vendor/rl-tools/LICENSE +21 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/all.cmake +14 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/git-diff.cmake +103 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/git-hash.cmake +13 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier1-blas.cmake +43 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier2-json-hdf5-zlib.cmake +84 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier3-tensorboard.cmake +29 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier4-cuda.cmake +33 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier5-cli11.cmake +26 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/assimp_fixup.cmake +16 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/googletest.cmake +17 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/metal.cmake +27 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/mujoco.cmake +32 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/optix.cmake +17 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/raytracing_generic.cmake +4 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/vulkan.cmake +6 -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/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 +946 -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 +703 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_generic.h +1334 -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 +205 -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_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 +411 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/devices.h +92 -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 +771 -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 +112 -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 +93 -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 +139 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_cuda.h +382 -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 +297 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_wasm32.h +225 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/mode/mode.h +75 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/activation_functions.h +115 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/capability.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/persist_code.h +27 -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 +184 -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 +739 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_generic.h +1185 -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 +421 -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 +55 -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 +534 -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 +217 -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 +152 -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 +375 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/helper_operations_generic.h +158 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/layer.h +218 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/operations_generic.h +947 -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 +214 -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 +428 -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 +494 -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 +291 -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 +268 -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 +158 -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 +228 -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 +16 -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 +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/adam.h +120 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_cuda.h +90 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_generic.h +144 -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 +79 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_cuda.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_generic.h +102 -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 +101 -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 +61 -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 +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/operations_generic.h +134 -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 +71 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_cuda.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_generic.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/sgd.h +91 -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 +90 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/parameters.h +78 -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 +133 -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/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 +381 -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 +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/operations_generic.h +76 -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 +135 -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 +280 -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 +6 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/model.h +276 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_cuda.h +165 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_generic.h +571 -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 +196 -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 +256 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/operations_generic.h +564 -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 +107 -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 +16 -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 +148 -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 +61 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_cuda.h +164 -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 +64 -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/raytracing/README.md +149 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_cpu.h +768 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_generic.h +1173 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/context.h +177 -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 +1122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device.h +212 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device_impl.h +934 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/operations_cuda.h +1678 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/overlay_accel.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/context.h +220 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/device_source.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/operations_cpu.h +1967 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_common.h +1986 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_mux.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/renderer.h +376 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/scene/procthor/operations_cpu.h +226 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/scene/procthor/scene.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/scene/scene.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/scene.h +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/transforms_generic.h +159 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/types.h +39 -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 +240 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_cuda.h +62 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_generic.h +245 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/persist.h +102 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/state.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_cuda.h +193 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic.h +334 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic_extensions.h +244 -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 +172 -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 +111 -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/on_policy_runner.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_accelerate.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_mkl.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cuda.h +195 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic.h +197 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic_extensions.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic_per_env.h +91 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/persist.h +61 -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/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/l2f/metrics.h +266 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/multirotor.h +1083 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_cpu.h +2119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_cuda.h +38 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/05_state_is_nan.h +126 -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 +189 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/30_sample_initial_state.h +276 -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 +625 -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 +329 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/80_abs_diff.h +290 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic.h +369 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_helper_generic.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic_forward.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/default.h +202 -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_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 +90 -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_code.h +53 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/quaternion_helper.h +94 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/ui.h +180 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f_visual/multirotor_visual.h +135 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f_visual/operations_cpu.h +244 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f_visual/operations_cuda.h +180 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f_visual/operations_generic.h +149 -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 +160 -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 +37 -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/operations_arm.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cpu.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cuda.h +25 -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 +105 -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 +149 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/typing.h +118 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/vector_operations.h +174 -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/backends/CMakeLists.txt +9 -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 +113 -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 +815 -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 +275 -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 +865 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/device_spirv.cpp +34 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/CMakeLists.txt +205 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/README.md +281 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark.cpp +175 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark_dynamic.cpp +494 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix.cpp +1629 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics.cu +523 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics.h +37 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/CMakeLists.txt +164 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/antialiasing.cpp +213 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone.cpp +367 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone_device.cu +385 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/environment.h +85 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/operations_cpu.h +270 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/example.cpp +276 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/fixed_pose.cpp +218 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/interactive.cpp +866 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/make_drone_glb.py +172 -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 +1833 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/render_pose_trace_motion_blur.cpp +646 -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 +221 -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/.build-check/inference_ios.o +0 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/.build-check/libinference_ios.a +0 -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 +456 -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 +445 -0
- hyperdrone/cuda/__init__.py +78 -0
- hyperdrone/dynamics/__init__.py +22 -0
- hyperdrone/dynamics/_component.py +40 -0
- hyperdrone/dynamics/_config.py +47 -0
- hyperdrone/dynamics/_sim.py +201 -0
- hyperdrone/env/__init__.py +15 -0
- hyperdrone/env/_sampling.py +67 -0
- hyperdrone/env/_world.py +60 -0
- hyperdrone/examples/__init__.py +11 -0
- hyperdrone/examples/benchmark.py +236 -0
- hyperdrone/examples/benchmark_minimal.py +66 -0
- hyperdrone/examples/data.py +42 -0
- hyperdrone/examples/drone_flythrough.py +142 -0
- hyperdrone/examples/render_procthor.py +41 -0
- hyperdrone/jit/__init__.py +111 -0
- hyperdrone/jit/_build.py +94 -0
- hyperdrone/jit/_lock.py +23 -0
- hyperdrone/jit/_patches.py +95 -0
- hyperdrone/jit/_toolchain.py +13 -0
- hyperdrone/jit/_workspace.py +70 -0
- hyperdrone/render/__init__.py +48 -0
- hyperdrone/render/_component.py +35 -0
- hyperdrone/render/_config.py +90 -0
- hyperdrone/render/_renderer.py +306 -0
- hyperdrone/render/_scene.py +34 -0
- hyperdrone-0.1.0.dist-info/METADATA +15 -0
- hyperdrone-0.1.0.dist-info/RECORD +660 -0
- hyperdrone-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
#include "../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_ACTIVATION_FUNCTIONS_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_ACTIVATION_FUNCTIONS_H
|
|
5
|
+
#ifndef RL_TOOLS_FUNCTION_PLACEMENT
|
|
6
|
+
#define RL_TOOLS_FUNCTION_PLACEMENT
|
|
7
|
+
#endif
|
|
8
|
+
#include "../devices/devices.h"
|
|
9
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
10
|
+
namespace rl_tools::nn::activation_functions {
|
|
11
|
+
enum ActivationFunction{
|
|
12
|
+
IDENTITY,
|
|
13
|
+
RELU,
|
|
14
|
+
GELU,
|
|
15
|
+
TANH,
|
|
16
|
+
FAST_TANH,
|
|
17
|
+
SIGMOID
|
|
18
|
+
};
|
|
19
|
+
template<enum ActivationFunction F>
|
|
20
|
+
constexpr bool check_activation_function = F == IDENTITY || F == RELU || F == GELU || F == TANH || F == FAST_TANH || F == SIGMOID;
|
|
21
|
+
}
|
|
22
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
23
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
24
|
+
namespace rl_tools{
|
|
25
|
+
template<typename DEVICE, typename T, nn::activation_functions::ActivationFunction F>
|
|
26
|
+
RL_TOOLS_FUNCTION_PLACEMENT inline T activation(T x){
|
|
27
|
+
using namespace nn::activation_functions;
|
|
28
|
+
static_assert(DEVICE::TYPE == devices::Type::math, "DEVICE is not a math device");
|
|
29
|
+
static_assert(nn::activation_functions::check_activation_function<F>, "Invalid activation function");
|
|
30
|
+
if constexpr(F == IDENTITY){
|
|
31
|
+
return x;
|
|
32
|
+
}
|
|
33
|
+
else if constexpr(F == RELU){
|
|
34
|
+
return math::max(DEVICE(), x, (T)0);
|
|
35
|
+
}
|
|
36
|
+
else if constexpr(F == GELU){
|
|
37
|
+
const T a = math::FRAC_2_SQRTPI<T> * math::SQRT1_2<T> * (T)0.5;
|
|
38
|
+
return (T)0.5 * (x + x * math::tanh(DEVICE(), a * ((T)0.044715f * x * x * x + x)));
|
|
39
|
+
}
|
|
40
|
+
else if constexpr(F == TANH){
|
|
41
|
+
return math::tanh(DEVICE(), x);
|
|
42
|
+
}
|
|
43
|
+
else if constexpr(F == FAST_TANH){
|
|
44
|
+
return math::fast_tanh(DEVICE(), x);
|
|
45
|
+
}
|
|
46
|
+
else if constexpr(F == SIGMOID){
|
|
47
|
+
return (T)1 / ((T)1 + math::exp(DEVICE(), -x));
|
|
48
|
+
}
|
|
49
|
+
else{
|
|
50
|
+
return 0;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
template<typename DEVICE, typename T, nn::activation_functions::ActivationFunction F>
|
|
55
|
+
RL_TOOLS_FUNCTION_PLACEMENT inline T d_activation_d_x(T x){
|
|
56
|
+
using namespace nn::activation_functions;
|
|
57
|
+
static_assert(DEVICE::TYPE == devices::Type::math, "DEVICE is not a math device");
|
|
58
|
+
static_assert(check_activation_function<F>, "Invalid activation function");
|
|
59
|
+
if constexpr(F == IDENTITY){
|
|
60
|
+
return 1;
|
|
61
|
+
}
|
|
62
|
+
else if constexpr(F == RELU){
|
|
63
|
+
return x > (T)0 ? (T)1 : (T)0;
|
|
64
|
+
}
|
|
65
|
+
else if constexpr(F == GELU){
|
|
66
|
+
const T a = math::FRAC_2_SQRTPI<T> * math::SQRT1_2<T> * (T)0.5;
|
|
67
|
+
const T b = (T)0.044715f;
|
|
68
|
+
T tanh_term = math::tanh(DEVICE(), a * (b * x * x * x + x));
|
|
69
|
+
return (T)0.5*((T)1 + tanh_term) + (T)0.5 * x * ((T)1 - tanh_term * tanh_term) * a * ((T)3 * b * x * x + (T)1);
|
|
70
|
+
}
|
|
71
|
+
else if constexpr(F == TANH){
|
|
72
|
+
T a = math::tanh(DEVICE(), x);
|
|
73
|
+
return (T)1 - a * a;
|
|
74
|
+
}
|
|
75
|
+
else if constexpr(F == FAST_TANH){
|
|
76
|
+
T a = math::fast_tanh(DEVICE(), x);
|
|
77
|
+
return (T)1 - a * a;
|
|
78
|
+
}
|
|
79
|
+
else if constexpr(F == SIGMOID){
|
|
80
|
+
return activation<DEVICE, T, SIGMOID>(x) * (1 - activation<DEVICE, T, SIGMOID>(x));
|
|
81
|
+
}
|
|
82
|
+
else{
|
|
83
|
+
return 0;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
template<typename DEVICE, typename T, nn::activation_functions::ActivationFunction F>
|
|
87
|
+
RL_TOOLS_FUNCTION_PLACEMENT auto name(){
|
|
88
|
+
using namespace nn::activation_functions;
|
|
89
|
+
if constexpr(F == IDENTITY){
|
|
90
|
+
return "IDENTITY";
|
|
91
|
+
}
|
|
92
|
+
else if constexpr(F == RELU){
|
|
93
|
+
return "RELU";
|
|
94
|
+
}
|
|
95
|
+
else if constexpr(F == GELU){
|
|
96
|
+
return "GELU";
|
|
97
|
+
}
|
|
98
|
+
else if constexpr(F == TANH){
|
|
99
|
+
return "TANH";
|
|
100
|
+
}
|
|
101
|
+
else if constexpr(F == FAST_TANH){
|
|
102
|
+
return "FAST_TANH";
|
|
103
|
+
}
|
|
104
|
+
else if constexpr(F == SIGMOID){
|
|
105
|
+
return "SIGMOID";
|
|
106
|
+
}
|
|
107
|
+
else{
|
|
108
|
+
return "NIL";
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
#endif
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
#include "../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_CAPABILITY_CAPABILITY_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_CAPABILITY_CAPABILITY_H
|
|
5
|
+
#ifndef RL_TOOLS_FUNCTION_PLACEMENT
|
|
6
|
+
#define RL_TOOLS_FUNCTION_PLACEMENT
|
|
7
|
+
#endif
|
|
8
|
+
|
|
9
|
+
#include "../parameters/parameters.h"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
// The Capability Configuraiton carries properties that apply to multiple parts of a model (e.g. the high-level mode, the layers, etc.)
|
|
13
|
+
// This allows e.g. to simply change the capabilities of a model without adapting all the involved specifications individually
|
|
14
|
+
|
|
15
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
16
|
+
namespace rl_tools::nn{
|
|
17
|
+
enum class LayerCapability{
|
|
18
|
+
Forward, // just forward
|
|
19
|
+
Backward, // forward + backward wrt to the input
|
|
20
|
+
Gradient // forward + backward wrt to the input + backward wrt to the weights
|
|
21
|
+
};
|
|
22
|
+
/*
|
|
23
|
+
Tags that can also carry the parameter type.
|
|
24
|
+
The LayerCapability determines some fields in the layers (e.g. the intermediate outputs are required for gradient calculations, while for the backward pass wrt. the input only the pre-activations might be needed)
|
|
25
|
+
The PARAMETER_TYPE determines the type of the parameters (e.g. adam requries first and second order moments in addition to the gradient)
|
|
26
|
+
This Capability system allows the switching of models for e.g. checkpointing: We are training a full model with gradients, and optimizers state then convert it to a forward only model (just the parameters) and save it as a checkpoint.
|
|
27
|
+
*/
|
|
28
|
+
namespace capability{
|
|
29
|
+
template <bool T_DYNAMIC_ALLOCATION=true, bool T_CONST=false>
|
|
30
|
+
struct Forward{
|
|
31
|
+
static constexpr LayerCapability TAG = LayerCapability::Forward;
|
|
32
|
+
using PARAMETER_TYPE = nn::parameters::Plain;
|
|
33
|
+
static constexpr auto BATCH_SIZE = 1;
|
|
34
|
+
static constexpr bool DYNAMIC_ALLOCATION = T_DYNAMIC_ALLOCATION;
|
|
35
|
+
static constexpr bool CONST = T_CONST;
|
|
36
|
+
template <bool TT_DYNAMIC_ALLOCATION=true, bool TT_CONST=false>
|
|
37
|
+
using CHANGE_PARAMETERS = Forward<TT_DYNAMIC_ALLOCATION, TT_CONST>;
|
|
38
|
+
};
|
|
39
|
+
template <bool T_DYNAMIC_ALLOCATION=true, bool T_CONST=false>
|
|
40
|
+
struct Backward{
|
|
41
|
+
static constexpr LayerCapability TAG = LayerCapability::Backward;
|
|
42
|
+
using PARAMETER_TYPE = nn::parameters::Plain;
|
|
43
|
+
static constexpr bool DYNAMIC_ALLOCATION = T_DYNAMIC_ALLOCATION;
|
|
44
|
+
static constexpr bool CONST = T_CONST;
|
|
45
|
+
template <bool TT_DYNAMIC_ALLOCATION=true, bool TT_CONST=false>
|
|
46
|
+
using CHANGE_PARAMETERS = Backward<TT_DYNAMIC_ALLOCATION, TT_CONST>;
|
|
47
|
+
};
|
|
48
|
+
template <typename T_PARAMETER_TYPE, bool T_DYNAMIC_ALLOCATION=true, bool T_CONST=false>
|
|
49
|
+
struct Gradient{
|
|
50
|
+
static constexpr LayerCapability TAG = LayerCapability::Gradient;
|
|
51
|
+
using PARAMETER_TYPE = T_PARAMETER_TYPE;
|
|
52
|
+
static constexpr bool DYNAMIC_ALLOCATION = T_DYNAMIC_ALLOCATION;
|
|
53
|
+
static_assert(!utils::typing::is_same_v<T_PARAMETER_TYPE, nn::parameters::Plain>);
|
|
54
|
+
static constexpr bool CONST = T_CONST;
|
|
55
|
+
template <bool TT_DYNAMIC_ALLOCATION=true, bool TT_CONST=false>
|
|
56
|
+
using CHANGE_PARAMETERS = Gradient<PARAMETER_TYPE, TT_DYNAMIC_ALLOCATION, TT_CONST>;
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
61
|
+
|
|
62
|
+
#endif
|
|
63
|
+
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
#include "../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_CAPABILITY_PERSIST_CODE_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_CAPABILITY_PERSIST_CODE_H
|
|
5
|
+
#ifndef RL_TOOLS_FUNCTION_PLACEMENT
|
|
6
|
+
#define RL_TOOLS_FUNCTION_PLACEMENT
|
|
7
|
+
#endif
|
|
8
|
+
|
|
9
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
10
|
+
namespace rl_tools{
|
|
11
|
+
template <bool DYNAMIC_ALLOCATION, bool CONST>
|
|
12
|
+
std::string to_string(nn::capability::Forward<DYNAMIC_ALLOCATION, CONST>){
|
|
13
|
+
return std::string("RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::nn::capability::Forward<") + (DYNAMIC_ALLOCATION ? "true" : "false") + ", " + (CONST ? "true" : "false") + ">";
|
|
14
|
+
}
|
|
15
|
+
template <bool DYNAMIC_ALLOCATION, bool CONST>
|
|
16
|
+
std::string to_string(nn::capability::Backward<DYNAMIC_ALLOCATION, CONST>){
|
|
17
|
+
return "RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::nn::capability::Backward<" + std::string((DYNAMIC_ALLOCATION ? "true" : "false")) + ", " + (CONST ? "true" : "false") + ">";
|
|
18
|
+
}
|
|
19
|
+
template <typename T_PARAMETER_TYPE, bool DYNAMIC_ALLOCATION, bool CONST>
|
|
20
|
+
std::string to_string(nn::capability::Gradient<T_PARAMETER_TYPE, DYNAMIC_ALLOCATION, CONST>){
|
|
21
|
+
return "RL_TOOLS""_NAMESPACE_WRAPPER ::rl_tools::nn::capability::Gradient<"+ get_type_string(T_PARAMETER_TYPE{}) + std::string(", ") + std::string((DYNAMIC_ALLOCATION ? "true" : "false")) + ", " + (CONST ? "true" : "false") + ">";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
25
|
+
|
|
26
|
+
#endif
|
|
27
|
+
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
#include "../../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_AVG_POOL2D_LAYER_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_LAYERS_AVG_POOL2D_LAYER_H
|
|
5
|
+
#include "../../../utils/generic/typing.h"
|
|
6
|
+
#include "../../../containers/tensor/tensor.h"
|
|
7
|
+
#include "../../../nn/capability/capability.h"
|
|
8
|
+
#include "../../../nn/parameters/parameters.h"
|
|
9
|
+
|
|
10
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
11
|
+
namespace rl_tools::nn::layers::avg_pool2d {
|
|
12
|
+
|
|
13
|
+
template<typename T_TYPE_POLICY, typename T_TI>
|
|
14
|
+
struct Configuration{
|
|
15
|
+
using TYPE_POLICY = T_TYPE_POLICY;
|
|
16
|
+
using TI = T_TI;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
template <typename T_CONFIG, typename T_CAPABILITY, typename T_INPUT_SHAPE>
|
|
20
|
+
struct Specification: T_CAPABILITY, T_CONFIG{
|
|
21
|
+
using CONFIG = T_CONFIG;
|
|
22
|
+
using TYPE_POLICY = typename CONFIG::TYPE_POLICY;
|
|
23
|
+
using TI = typename CONFIG::TI;
|
|
24
|
+
using CAPABILITY = T_CAPABILITY;
|
|
25
|
+
using INPUT_SHAPE = T_INPUT_SHAPE;
|
|
26
|
+
static_assert(length(INPUT_SHAPE{}) >= 4, "AvgPool2d input shape must have at least 4 dimensions (...BATCH x H x W x C)");
|
|
27
|
+
static constexpr TI INPUT_HEIGHT = get<length(INPUT_SHAPE{})-3>(INPUT_SHAPE{});
|
|
28
|
+
static constexpr TI INPUT_WIDTH = get<length(INPUT_SHAPE{})-2>(INPUT_SHAPE{});
|
|
29
|
+
static constexpr TI INPUT_CHANNELS = get_last(INPUT_SHAPE{});
|
|
30
|
+
static constexpr TI OUTPUT_CHANNELS = INPUT_CHANNELS;
|
|
31
|
+
|
|
32
|
+
using BATCH_SHAPE = tensor::PopBack<tensor::PopBack<tensor::PopBack<INPUT_SHAPE>>>;
|
|
33
|
+
// Compute INTERNAL_BATCH_SIZE = product of all dims except the last 3 (H, W, C)
|
|
34
|
+
static constexpr TI INTERNAL_BATCH_SIZE = get<0>(tensor::CumulativeProduct<BATCH_SHAPE>{});
|
|
35
|
+
|
|
36
|
+
// Output shape: (...BATCH, C) [global average pool collapses H and W, preserves batch dims]
|
|
37
|
+
template <typename NEW_INPUT_SHAPE>
|
|
38
|
+
struct OUTPUT_SHAPE_FACTORY{
|
|
39
|
+
static_assert(length(NEW_INPUT_SHAPE{}) >= 4);
|
|
40
|
+
static constexpr TI NEW_C = get_last(NEW_INPUT_SHAPE{});
|
|
41
|
+
static_assert(NEW_C == INPUT_CHANNELS);
|
|
42
|
+
// Pop C, W, H from the back to get batch dims, then append C.
|
|
43
|
+
using NEW_BATCH_SHAPE = tensor::PopBack<tensor::PopBack<tensor::PopBack<NEW_INPUT_SHAPE>>>;
|
|
44
|
+
using SHAPE = tensor::Append<NEW_BATCH_SHAPE, NEW_C>;
|
|
45
|
+
};
|
|
46
|
+
using OUTPUT_SHAPE = typename OUTPUT_SHAPE_FACTORY<INPUT_SHAPE>::SHAPE;
|
|
47
|
+
static constexpr TI NUM_WEIGHTS = 0;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
template<typename SPEC_1, typename SPEC_2>
|
|
51
|
+
constexpr bool check_spec_memory =
|
|
52
|
+
SPEC_1::INPUT_HEIGHT == SPEC_2::INPUT_HEIGHT
|
|
53
|
+
&& SPEC_1::INPUT_WIDTH == SPEC_2::INPUT_WIDTH
|
|
54
|
+
&& SPEC_1::INPUT_CHANNELS == SPEC_2::INPUT_CHANNELS;
|
|
55
|
+
|
|
56
|
+
template<typename SPEC_1, typename SPEC_2>
|
|
57
|
+
constexpr bool check_spec = check_spec_memory<SPEC_1, SPEC_2>;
|
|
58
|
+
|
|
59
|
+
template <typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC>
|
|
60
|
+
constexpr bool check_input_output =
|
|
61
|
+
length(typename INPUT_SPEC::SHAPE{}) >= 4 &&
|
|
62
|
+
length(typename OUTPUT_SPEC::SHAPE{}) >= 2 &&
|
|
63
|
+
get<length(typename INPUT_SPEC::SHAPE{})-1>(typename INPUT_SPEC::SHAPE{}) == LAYER_SPEC::INPUT_CHANNELS &&
|
|
64
|
+
get<length(typename INPUT_SPEC::SHAPE{})-2>(typename INPUT_SPEC::SHAPE{}) == LAYER_SPEC::INPUT_WIDTH &&
|
|
65
|
+
get<length(typename INPUT_SPEC::SHAPE{})-3>(typename INPUT_SPEC::SHAPE{}) == LAYER_SPEC::INPUT_HEIGHT &&
|
|
66
|
+
get_last(typename OUTPUT_SPEC::SHAPE{}) == LAYER_SPEC::OUTPUT_CHANNELS;
|
|
67
|
+
|
|
68
|
+
struct State{};
|
|
69
|
+
struct Buffer{};
|
|
70
|
+
|
|
71
|
+
template<typename T_SPEC>
|
|
72
|
+
struct LayerForward {
|
|
73
|
+
using SPEC = T_SPEC;
|
|
74
|
+
using TYPE_POLICY = typename SPEC::TYPE_POLICY;
|
|
75
|
+
using TI = typename SPEC::TI;
|
|
76
|
+
static constexpr TI INPUT_HEIGHT = SPEC::INPUT_HEIGHT;
|
|
77
|
+
static constexpr TI INPUT_WIDTH = SPEC::INPUT_WIDTH;
|
|
78
|
+
static constexpr TI INPUT_CHANNELS = SPEC::INPUT_CHANNELS;
|
|
79
|
+
static constexpr TI OUTPUT_CHANNELS = SPEC::OUTPUT_CHANNELS;
|
|
80
|
+
static constexpr TI NUM_WEIGHTS = SPEC::NUM_WEIGHTS;
|
|
81
|
+
static constexpr TI INTERNAL_BATCH_SIZE = SPEC::INTERNAL_BATCH_SIZE;
|
|
82
|
+
using INPUT_SHAPE = typename SPEC::INPUT_SHAPE;
|
|
83
|
+
template <typename NEW_INPUT_SHAPE>
|
|
84
|
+
using OUTPUT_SHAPE_FACTORY = typename SPEC::template OUTPUT_SHAPE_FACTORY<NEW_INPUT_SHAPE>::SHAPE;
|
|
85
|
+
using OUTPUT_SHAPE = typename SPEC::OUTPUT_SHAPE;
|
|
86
|
+
template<bool DYNAMIC_ALLOCATION=true>
|
|
87
|
+
using Buffer = avg_pool2d::Buffer;
|
|
88
|
+
template<bool DYNAMIC_ALLOCATION=true>
|
|
89
|
+
using State = avg_pool2d::State;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
template<typename SPEC>
|
|
93
|
+
struct LayerBackward: public LayerForward<SPEC>{};
|
|
94
|
+
|
|
95
|
+
template<typename SPEC>
|
|
96
|
+
struct LayerGradient: public LayerBackward<SPEC>{
|
|
97
|
+
using T = typename SPEC::TYPE_POLICY::template GET<numeric_types::categories::Activation>;
|
|
98
|
+
using TI = typename SPEC::TI;
|
|
99
|
+
// Internal storage: [INTERNAL_BATCH_SIZE, CHANNELS] (mapped to OUTPUT_SHAPE via view_memory)
|
|
100
|
+
using OUTPUT_CONTAINER_SHAPE = tensor::Shape<TI, SPEC::INTERNAL_BATCH_SIZE, SPEC::OUTPUT_CHANNELS>;
|
|
101
|
+
using OUTPUT_CONTAINER_SPEC = tensor::Specification<T, TI, OUTPUT_CONTAINER_SHAPE, SPEC::DYNAMIC_ALLOCATION, tensor::RowMajorStride<OUTPUT_CONTAINER_SHAPE>, SPEC::CONST>;
|
|
102
|
+
using OUTPUT_CONTAINER_TYPE = Tensor<OUTPUT_CONTAINER_SPEC>;
|
|
103
|
+
OUTPUT_CONTAINER_TYPE output;
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
template<typename CONFIG, typename CAPABILITY, typename INPUT_SHAPE>
|
|
107
|
+
using Layer =
|
|
108
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Forward,
|
|
109
|
+
LayerForward<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>,
|
|
110
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Backward,
|
|
111
|
+
LayerBackward<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>,
|
|
112
|
+
typename utils::typing::conditional_t<CAPABILITY::TAG == nn::LayerCapability::Gradient,
|
|
113
|
+
LayerGradient<Specification<CONFIG, CAPABILITY, INPUT_SHAPE>>, void>>>;
|
|
114
|
+
|
|
115
|
+
template <typename CONFIG>
|
|
116
|
+
struct BindConfiguration{
|
|
117
|
+
template <typename CAPABILITY, typename INPUT_SHAPE>
|
|
118
|
+
using Layer = nn::layers::avg_pool2d::Layer<CONFIG, CAPABILITY, INPUT_SHAPE>;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
122
|
+
#endif
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
#include "../../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_AVG_POOL2D_OPERATIONS_CUDA_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_LAYERS_AVG_POOL2D_OPERATIONS_CUDA_H
|
|
5
|
+
#include "../../../devices/cuda.h"
|
|
6
|
+
#include "../../../nn/nn.h"
|
|
7
|
+
#include "../../../mode/mode.h"
|
|
8
|
+
#include "layer.h"
|
|
9
|
+
#include <cudnn.h>
|
|
10
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
11
|
+
namespace rl_tools{
|
|
12
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
13
|
+
RL_TOOLS_FUNCTION_PLACEMENT void evaluate(devices::CUDA<DEV_SPEC>& device, const nn::layers::avg_pool2d::LayerForward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::avg_pool2d::Buffer&, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
14
|
+
static_assert(nn::layers::avg_pool2d::check_input_output<LAYER_SPEC, INPUT_SPEC, OUTPUT_SPEC>);
|
|
15
|
+
using T = typename OUTPUT_SPEC::T;
|
|
16
|
+
using TI = typename devices::CUDA<DEV_SPEC>::index_t;
|
|
17
|
+
constexpr TI N = LAYER_SPEC::INTERNAL_BATCH_SIZE, IH = LAYER_SPEC::INPUT_HEIGHT, IW = LAYER_SPEC::INPUT_WIDTH, C = LAYER_SPEC::INPUT_CHANNELS;
|
|
18
|
+
constexpr cudnnDataType_t dt = nn::cuda::get_cudnn_dtype<T>();
|
|
19
|
+
cudnnTensorDescriptor_t xd, yd;
|
|
20
|
+
check_cudnn_call(device, cudnnCreateTensorDescriptor(&xd), "cudnnCreateTensorDescriptor avgpool.xd");
|
|
21
|
+
check_cudnn_call(device, cudnnSetTensor4dDescriptor(xd, CUDNN_TENSOR_NHWC, dt, N, C, IH, IW), "cudnnSetTensor4dDescriptor avgpool.xd");
|
|
22
|
+
check_cudnn_call(device, cudnnCreateTensorDescriptor(&yd), "cudnnCreateTensorDescriptor avgpool.yd");
|
|
23
|
+
check_cudnn_call(device, cudnnSetTensor4dDescriptor(yd, CUDNN_TENSOR_NHWC, dt, N, C, 1, 1), "cudnnSetTensor4dDescriptor avgpool.yd");
|
|
24
|
+
cudnnPoolingDescriptor_t pd;
|
|
25
|
+
check_cudnn_call(device, cudnnCreatePoolingDescriptor(&pd), "cudnnCreatePoolingDescriptor avgpool.pd");
|
|
26
|
+
check_cudnn_call(device, cudnnSetPooling2dDescriptor(pd, CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING, CUDNN_NOT_PROPAGATE_NAN, IH, IW, 0, 0, 1, 1), "cudnnSetPooling2dDescriptor avgpool.pd");
|
|
27
|
+
float a = 1, b = 0;
|
|
28
|
+
check_cudnn_call(device, cudnnPoolingForward(device.cudnn_handle, pd, &a, xd, input._data, &b, yd, output._data), "cudnnPoolingForward avgpool");
|
|
29
|
+
check_cudnn_call(device, cudnnDestroyPoolingDescriptor(pd), "cudnnDestroyPoolingDescriptor avgpool.pd");
|
|
30
|
+
check_cudnn_call(device, cudnnDestroyTensorDescriptor(xd), "cudnnDestroyTensorDescriptor avgpool.xd");
|
|
31
|
+
check_cudnn_call(device, cudnnDestroyTensorDescriptor(yd), "cudnnDestroyTensorDescriptor avgpool.yd");
|
|
32
|
+
check_status(device);
|
|
33
|
+
}
|
|
34
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
35
|
+
RL_TOOLS_FUNCTION_PLACEMENT void forward(devices::CUDA<DEV_SPEC>& device, nn::layers::avg_pool2d::LayerBackward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::avg_pool2d::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
36
|
+
evaluate(device, static_cast<const nn::layers::avg_pool2d::LayerForward<LAYER_SPEC>&>(layer), input, output, buffer, rng, mode);
|
|
37
|
+
}
|
|
38
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename MODE = mode::Default<>>
|
|
39
|
+
void backward(devices::CUDA<DEV_SPEC>& device, nn::layers::avg_pool2d::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, nn::layers::avg_pool2d::Buffer&, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
40
|
+
}
|
|
41
|
+
template<typename DEV_SPEC, typename LAYER_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename D_INPUT_SPEC, typename MODE = mode::Default<>>
|
|
42
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward_full(devices::CUDA<DEV_SPEC>& device, nn::layers::avg_pool2d::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, Tensor<D_INPUT_SPEC>& d_input, nn::layers::avg_pool2d::Buffer& buffer, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
43
|
+
using T = typename D_OUTPUT_SPEC::T;
|
|
44
|
+
using TI = typename devices::CUDA<DEV_SPEC>::index_t;
|
|
45
|
+
constexpr TI N = LAYER_SPEC::INTERNAL_BATCH_SIZE, IH = LAYER_SPEC::INPUT_HEIGHT, IW = LAYER_SPEC::INPUT_WIDTH, C = LAYER_SPEC::INPUT_CHANNELS;
|
|
46
|
+
constexpr cudnnDataType_t dt = nn::cuda::get_cudnn_dtype<T>();
|
|
47
|
+
cudnnTensorDescriptor_t xd, yd;
|
|
48
|
+
check_cudnn_call(device, cudnnCreateTensorDescriptor(&xd), "cudnnCreateTensorDescriptor avgpool_bwd.xd");
|
|
49
|
+
check_cudnn_call(device, cudnnSetTensor4dDescriptor(xd, CUDNN_TENSOR_NHWC, dt, N, C, IH, IW), "cudnnSetTensor4dDescriptor avgpool_bwd.xd");
|
|
50
|
+
check_cudnn_call(device, cudnnCreateTensorDescriptor(&yd), "cudnnCreateTensorDescriptor avgpool_bwd.yd");
|
|
51
|
+
check_cudnn_call(device, cudnnSetTensor4dDescriptor(yd, CUDNN_TENSOR_NHWC, dt, N, C, 1, 1), "cudnnSetTensor4dDescriptor avgpool_bwd.yd");
|
|
52
|
+
cudnnPoolingDescriptor_t pd;
|
|
53
|
+
check_cudnn_call(device, cudnnCreatePoolingDescriptor(&pd), "cudnnCreatePoolingDescriptor avgpool_bwd.pd");
|
|
54
|
+
check_cudnn_call(device, cudnnSetPooling2dDescriptor(pd, CUDNN_POOLING_AVERAGE_COUNT_INCLUDE_PADDING, CUDNN_NOT_PROPAGATE_NAN, IH, IW, 0, 0, 1, 1), "cudnnSetPooling2dDescriptor avgpool_bwd.pd");
|
|
55
|
+
float a = 1, b = 0;
|
|
56
|
+
check_cudnn_call(device, cudnnPoolingBackward(device.cudnn_handle, pd, &a, yd, layer.output._data, yd, d_output._data, xd, input._data, &b, xd, d_input._data), "cudnnPoolingBackward avgpool");
|
|
57
|
+
check_cudnn_call(device, cudnnDestroyPoolingDescriptor(pd), "cudnnDestroyPoolingDescriptor avgpool_bwd.pd");
|
|
58
|
+
check_cudnn_call(device, cudnnDestroyTensorDescriptor(xd), "cudnnDestroyTensorDescriptor avgpool_bwd.xd");
|
|
59
|
+
check_cudnn_call(device, cudnnDestroyTensorDescriptor(yd), "cudnnDestroyTensorDescriptor avgpool_bwd.yd");
|
|
60
|
+
check_status(device);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
64
|
+
#endif
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
#include "../../../version.h"
|
|
2
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_AVG_POOL2D_OPERATIONS_GENERIC_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
3
|
+
#pragma once
|
|
4
|
+
#define RL_TOOLS_NN_LAYERS_AVG_POOL2D_OPERATIONS_GENERIC_H
|
|
5
|
+
#include "layer.h"
|
|
6
|
+
#ifndef RL_TOOLS_FUNCTION_PLACEMENT
|
|
7
|
+
#define RL_TOOLS_FUNCTION_PLACEMENT
|
|
8
|
+
#endif
|
|
9
|
+
|
|
10
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
11
|
+
namespace rl_tools{
|
|
12
|
+
// ======================== malloc / free ========================
|
|
13
|
+
template<typename DEVICE, typename SPEC>
|
|
14
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::avg_pool2d::LayerForward<SPEC>& layer) {}
|
|
15
|
+
template<typename DEVICE, typename SPEC>
|
|
16
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::avg_pool2d::LayerForward<SPEC>& layer) {}
|
|
17
|
+
template<typename DEVICE, typename SPEC>
|
|
18
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::avg_pool2d::LayerBackward<SPEC>& layer) {}
|
|
19
|
+
template<typename DEVICE, typename SPEC>
|
|
20
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::avg_pool2d::LayerBackward<SPEC>& layer) {}
|
|
21
|
+
template<typename DEVICE, typename SPEC>
|
|
22
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<SPEC>& layer) {
|
|
23
|
+
malloc(device, layer.output);
|
|
24
|
+
}
|
|
25
|
+
template<typename DEVICE, typename SPEC>
|
|
26
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<SPEC>& layer) {
|
|
27
|
+
free(device, layer.output);
|
|
28
|
+
}
|
|
29
|
+
template<typename DEVICE>
|
|
30
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::avg_pool2d::State&) {}
|
|
31
|
+
template<typename DEVICE>
|
|
32
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::avg_pool2d::State&) {}
|
|
33
|
+
template<typename DEVICE>
|
|
34
|
+
RL_TOOLS_FUNCTION_PLACEMENT void malloc(DEVICE& device, nn::layers::avg_pool2d::Buffer&) {}
|
|
35
|
+
template<typename DEVICE>
|
|
36
|
+
RL_TOOLS_FUNCTION_PLACEMENT void free(DEVICE& device, nn::layers::avg_pool2d::Buffer&) {}
|
|
37
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE>
|
|
38
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE&, TARGET_DEVICE&, nn::layers::avg_pool2d::State&, nn::layers::avg_pool2d::State&) {}
|
|
39
|
+
template<typename SPEC, typename DEVICE, typename RNG, typename MODE>
|
|
40
|
+
RL_TOOLS_FUNCTION_PLACEMENT void reset(DEVICE&, const nn::layers::avg_pool2d::LayerForward<SPEC>&, nn::layers::avg_pool2d::State&, RNG&, Mode<MODE>) {}
|
|
41
|
+
|
|
42
|
+
// ======================== init_weights (no-op) ========================
|
|
43
|
+
template<typename DEVICE, typename SPEC, typename RNG>
|
|
44
|
+
RL_TOOLS_FUNCTION_PLACEMENT void init_weights(DEVICE& device, nn::layers::avg_pool2d::LayerForward<SPEC>& layer, RNG& rng) {}
|
|
45
|
+
|
|
46
|
+
// ======================== evaluate ========================
|
|
47
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
48
|
+
RL_TOOLS_FUNCTION_PLACEMENT void evaluate(DEVICE& device, const nn::layers::avg_pool2d::LayerForward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::avg_pool2d::Buffer&, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
49
|
+
static_assert(nn::layers::avg_pool2d::check_input_output<LAYER_SPEC, INPUT_SPEC, OUTPUT_SPEC>);
|
|
50
|
+
using TI = typename DEVICE::index_t;
|
|
51
|
+
using T = typename OUTPUT_SPEC::T;
|
|
52
|
+
constexpr TI IH = LAYER_SPEC::INPUT_HEIGHT;
|
|
53
|
+
constexpr TI IW = LAYER_SPEC::INPUT_WIDTH;
|
|
54
|
+
constexpr TI C = LAYER_SPEC::INPUT_CHANNELS;
|
|
55
|
+
constexpr TI BATCH_SIZE = product(typename INPUT_SPEC::SHAPE{}) / (IH * IW * C);
|
|
56
|
+
using INTERNAL_INPUT_SHAPE = tensor::Shape<TI, BATCH_SIZE, IH, IW, C>;
|
|
57
|
+
using INTERNAL_OUTPUT_SHAPE = tensor::Shape<TI, BATCH_SIZE, C>;
|
|
58
|
+
auto input_4d = view_memory<INTERNAL_INPUT_SHAPE>(device, input);
|
|
59
|
+
auto output_2d = view_memory<INTERNAL_OUTPUT_SHAPE>(device, output);
|
|
60
|
+
constexpr T scale = (T)1 / (T)(IH * IW);
|
|
61
|
+
for(TI bi = 0; bi < BATCH_SIZE; bi++){
|
|
62
|
+
for(TI c_i = 0; c_i < C; c_i++){
|
|
63
|
+
T acc = 0;
|
|
64
|
+
for(TI h = 0; h < IH; h++){
|
|
65
|
+
for(TI w = 0; w < IW; w++){
|
|
66
|
+
acc += get(device, input_4d, bi, h, w, c_i);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
set(device, output_2d, acc * scale, bi, c_i);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
75
|
+
RL_TOOLS_FUNCTION_PLACEMENT void evaluate_step(DEVICE& device, const nn::layers::avg_pool2d::LayerForward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, nn::layers::avg_pool2d::State& state, Tensor<OUTPUT_SPEC>& output, nn::layers::avg_pool2d::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
76
|
+
evaluate(device, layer, input, output, buffer, rng, mode);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
80
|
+
RL_TOOLS_FUNCTION_PLACEMENT void forward(DEVICE& device, nn::layers::avg_pool2d::LayerBackward<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::avg_pool2d::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
81
|
+
evaluate(device, static_cast<const nn::layers::avg_pool2d::LayerForward<LAYER_SPEC>&>(layer), input, output, buffer, rng, mode);
|
|
82
|
+
}
|
|
83
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
84
|
+
RL_TOOLS_FUNCTION_PLACEMENT void forward(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, nn::layers::avg_pool2d::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
85
|
+
forward(device, static_cast<nn::layers::avg_pool2d::LayerBackward<LAYER_SPEC>&>(layer), input, layer.output, buffer, rng, mode);
|
|
86
|
+
}
|
|
87
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename OUTPUT_SPEC, typename RNG, typename MODE = mode::Default<>>
|
|
88
|
+
RL_TOOLS_FUNCTION_PLACEMENT void forward(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<OUTPUT_SPEC>& output, nn::layers::avg_pool2d::Buffer& buffer, RNG& rng, const Mode<MODE>& mode = Mode<mode::Default<>>{}) {
|
|
89
|
+
forward(device, layer, input, buffer, rng, mode);
|
|
90
|
+
copy(device, device, layer.output, output);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// ======================== backward ========================
|
|
94
|
+
template<typename DEVICE, typename LAYER_SPEC, typename D_OUTPUT_SPEC, typename D_INPUT_SPEC, typename MODE = mode::Default<>>
|
|
95
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward_input(DEVICE& device, const nn::layers::avg_pool2d::LayerBackward<LAYER_SPEC>& layer, const Tensor<D_OUTPUT_SPEC>& d_output, Tensor<D_INPUT_SPEC>& d_input, nn::layers::avg_pool2d::Buffer&, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
96
|
+
static_assert(nn::layers::avg_pool2d::check_input_output<LAYER_SPEC, D_INPUT_SPEC, D_OUTPUT_SPEC>);
|
|
97
|
+
using TI = typename DEVICE::index_t;
|
|
98
|
+
using T = typename D_OUTPUT_SPEC::T;
|
|
99
|
+
constexpr TI BATCH_SIZE = LAYER_SPEC::INTERNAL_BATCH_SIZE;
|
|
100
|
+
constexpr TI IH = LAYER_SPEC::INPUT_HEIGHT;
|
|
101
|
+
constexpr TI IW = LAYER_SPEC::INPUT_WIDTH;
|
|
102
|
+
constexpr TI C = LAYER_SPEC::INPUT_CHANNELS;
|
|
103
|
+
using INTERNAL_D_OUTPUT_SHAPE = tensor::Shape<TI, BATCH_SIZE, C>;
|
|
104
|
+
using INTERNAL_D_INPUT_SHAPE = tensor::Shape<TI, BATCH_SIZE, IH, IW, C>;
|
|
105
|
+
auto d_output_2d = view_memory<INTERNAL_D_OUTPUT_SHAPE>(device, d_output);
|
|
106
|
+
auto d_input_4d = view_memory<INTERNAL_D_INPUT_SHAPE>(device, d_input);
|
|
107
|
+
constexpr T scale = (T)1 / (T)(IH * IW);
|
|
108
|
+
for(TI bi = 0; bi < BATCH_SIZE; bi++){
|
|
109
|
+
for(TI c_i = 0; c_i < C; c_i++){
|
|
110
|
+
T grad = get(device, d_output_2d, bi, c_i) * scale;
|
|
111
|
+
for(TI h = 0; h < IH; h++){
|
|
112
|
+
for(TI w = 0; w < IW; w++){
|
|
113
|
+
set(device, d_input_4d, grad, bi, h, w, c_i);
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename MODE = mode::Default<>>
|
|
120
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, nn::layers::avg_pool2d::Buffer&, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
121
|
+
// No parameters to accumulate gradients for
|
|
122
|
+
}
|
|
123
|
+
template<typename DEVICE, typename LAYER_SPEC, typename INPUT_SPEC, typename D_OUTPUT_SPEC, typename D_INPUT_SPEC, typename MODE = mode::Default<>>
|
|
124
|
+
RL_TOOLS_FUNCTION_PLACEMENT void backward_full(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<LAYER_SPEC>& layer, const Tensor<INPUT_SPEC>& input, Tensor<D_OUTPUT_SPEC>& d_output, Tensor<D_INPUT_SPEC>& d_input, nn::layers::avg_pool2d::Buffer& buffer, const Mode<MODE>& mode = Mode<mode::Default<>>{}){
|
|
125
|
+
backward_input(device, static_cast<const nn::layers::avg_pool2d::LayerBackward<LAYER_SPEC>&>(layer), d_output, d_input, buffer, mode);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// ======================== zero_gradient / update / _reset_optimizer_state (no-ops) ========================
|
|
129
|
+
template<typename DEVICE, typename SPEC>
|
|
130
|
+
RL_TOOLS_FUNCTION_PLACEMENT void zero_gradient(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<SPEC>& layer) {}
|
|
131
|
+
template<typename DEVICE, typename SPEC, typename OPTIMIZER>
|
|
132
|
+
RL_TOOLS_FUNCTION_PLACEMENT void update(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<SPEC>& layer, OPTIMIZER& optimizer) {}
|
|
133
|
+
template<typename DEVICE, typename SPEC, typename OPTIMIZER>
|
|
134
|
+
RL_TOOLS_FUNCTION_PLACEMENT void _reset_optimizer_state(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<SPEC>& layer, OPTIMIZER& optimizer) {}
|
|
135
|
+
|
|
136
|
+
// ======================== copy ========================
|
|
137
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
138
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, const nn::layers::avg_pool2d::LayerForward<SOURCE_SPEC>& source, nn::layers::avg_pool2d::LayerForward<TARGET_SPEC>& target) {
|
|
139
|
+
static_assert(nn::layers::avg_pool2d::check_spec_memory<SOURCE_SPEC, TARGET_SPEC>);
|
|
140
|
+
}
|
|
141
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
142
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, const nn::layers::avg_pool2d::LayerBackward<SOURCE_SPEC>& source, nn::layers::avg_pool2d::LayerBackward<TARGET_SPEC>& target) {
|
|
143
|
+
static_assert(nn::layers::avg_pool2d::check_spec_memory<SOURCE_SPEC, TARGET_SPEC>);
|
|
144
|
+
}
|
|
145
|
+
template<typename SOURCE_DEVICE, typename TARGET_DEVICE, typename SOURCE_SPEC, typename TARGET_SPEC>
|
|
146
|
+
RL_TOOLS_FUNCTION_PLACEMENT void copy(SOURCE_DEVICE& source_device, TARGET_DEVICE& target_device, const nn::layers::avg_pool2d::LayerGradient<SOURCE_SPEC>& source, nn::layers::avg_pool2d::LayerGradient<TARGET_SPEC>& target) {
|
|
147
|
+
static_assert(nn::layers::avg_pool2d::check_spec_memory<SOURCE_SPEC, TARGET_SPEC>);
|
|
148
|
+
copy(source_device, target_device, source.output, target.output);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// ======================== abs_diff ========================
|
|
152
|
+
template<typename DEVICE, typename S1, typename S2>
|
|
153
|
+
RL_TOOLS_FUNCTION_PLACEMENT typename S1::TYPE_POLICY::DEFAULT abs_diff(DEVICE& device, const nn::layers::avg_pool2d::LayerForward<S1>&, const nn::layers::avg_pool2d::LayerForward<S2>&) { return 0; }
|
|
154
|
+
template<typename DEVICE, typename S1, typename S2>
|
|
155
|
+
RL_TOOLS_FUNCTION_PLACEMENT typename S1::TYPE_POLICY::DEFAULT abs_diff(DEVICE& device, const nn::layers::avg_pool2d::LayerBackward<S1>&, const nn::layers::avg_pool2d::LayerBackward<S2>&) { return 0; }
|
|
156
|
+
template<typename DEVICE, typename S1, typename S2>
|
|
157
|
+
RL_TOOLS_FUNCTION_PLACEMENT typename S1::TYPE_POLICY::DEFAULT abs_diff(DEVICE& device, const nn::layers::avg_pool2d::LayerGradient<S1>& l1, const nn::layers::avg_pool2d::LayerGradient<S2>& l2) { return abs_diff(device, l1.output, l2.output); }
|
|
158
|
+
template<typename DEVICE>
|
|
159
|
+
RL_TOOLS_FUNCTION_PLACEMENT auto abs_diff(DEVICE& device, const nn::layers::avg_pool2d::State&, const nn::layers::avg_pool2d::State&) { return 0; }
|
|
160
|
+
|
|
161
|
+
// ======================== reset_forward_state ========================
|
|
162
|
+
template<typename DEVICE, typename SPEC>
|
|
163
|
+
RL_TOOLS_FUNCTION_PLACEMENT void reset_forward_state(DEVICE& device, nn::layers::avg_pool2d::LayerBackward<SPEC>&) {}
|
|
164
|
+
template<typename DEVICE, typename SPEC>
|
|
165
|
+
RL_TOOLS_FUNCTION_PLACEMENT void reset_forward_state(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<SPEC>& l) { set_all(device, l.output, 0); }
|
|
166
|
+
|
|
167
|
+
// ======================== is_nan ========================
|
|
168
|
+
template<typename DEVICE, typename SPEC, typename MODE = mode::Default<>>
|
|
169
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE&, const nn::layers::avg_pool2d::LayerForward<SPEC>&, const Mode<MODE>& = Mode<mode::Default<>>{}) { return false; }
|
|
170
|
+
template<typename DEVICE, typename SPEC, typename MODE = mode::Default<>>
|
|
171
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE&, const nn::layers::avg_pool2d::LayerBackward<SPEC>&, const Mode<MODE>& = Mode<mode::Default<>>{}) { return false; }
|
|
172
|
+
template<typename DEVICE, typename SPEC, typename MODE = mode::Default<>>
|
|
173
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE& device, const nn::layers::avg_pool2d::LayerGradient<SPEC>& l, const Mode<MODE>& mode = Mode<mode::Default<>>{}) { return is_nan(device, l.output, mode); }
|
|
174
|
+
template<typename DEVICE, typename MODE = mode::Default<>>
|
|
175
|
+
RL_TOOLS_FUNCTION_PLACEMENT bool is_nan(DEVICE&, nn::layers::avg_pool2d::State&, const Mode<MODE>& = Mode<mode::Default<>>{}) { return false; }
|
|
176
|
+
|
|
177
|
+
// ======================== output ========================
|
|
178
|
+
template<typename DEVICE, typename SPEC>
|
|
179
|
+
RL_TOOLS_FUNCTION_PLACEMENT auto output(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<SPEC>& l){
|
|
180
|
+
return view_memory<typename SPEC::OUTPUT_SHAPE>(device, l.output);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
184
|
+
#endif
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#if (defined(RL_TOOLS_DISABLE_INCLUDE_GUARDS) || !defined(RL_TOOLS_NN_LAYERS_AVG_POOL2D_PERSIST_H)) && (RL_TOOLS_USE_THIS_VERSION == 1)
|
|
2
|
+
#pragma once
|
|
3
|
+
#define RL_TOOLS_NN_LAYERS_AVG_POOL2D_PERSIST_H
|
|
4
|
+
#include "../../../version.h"
|
|
5
|
+
#include "layer.h"
|
|
6
|
+
RL_TOOLS_NAMESPACE_WRAPPER_START
|
|
7
|
+
namespace rl_tools {
|
|
8
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
9
|
+
void save(DEVICE& device, nn::layers::avg_pool2d::LayerForward<SPEC>& layer, GROUP& group) {
|
|
10
|
+
set_attribute(device, group, "type", "avg_pool2d");
|
|
11
|
+
write_attributes(device, group);
|
|
12
|
+
}
|
|
13
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
14
|
+
void save(DEVICE& device, nn::layers::avg_pool2d::LayerBackward<SPEC>& layer, GROUP& group) {
|
|
15
|
+
save(device, (nn::layers::avg_pool2d::LayerForward<SPEC>&)layer, group);
|
|
16
|
+
}
|
|
17
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
18
|
+
void save(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<SPEC>& layer, GROUP& group) {
|
|
19
|
+
save(device, (nn::layers::avg_pool2d::LayerBackward<SPEC>&)layer, group);
|
|
20
|
+
}
|
|
21
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
22
|
+
bool load(DEVICE& device, nn::layers::avg_pool2d::LayerForward<SPEC>& layer, GROUP& group) { return true; }
|
|
23
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
24
|
+
bool load(DEVICE& device, nn::layers::avg_pool2d::LayerBackward<SPEC>& layer, GROUP& group) { return true; }
|
|
25
|
+
template<typename DEVICE, typename SPEC, typename GROUP>
|
|
26
|
+
bool load(DEVICE& device, nn::layers::avg_pool2d::LayerGradient<SPEC>& layer, GROUP& group) { return true; }
|
|
27
|
+
template<typename DEVICE, typename GROUP>
|
|
28
|
+
void save(DEVICE& device, nn::layers::avg_pool2d::State& state, GROUP& group) {}
|
|
29
|
+
template<typename DEVICE, typename GROUP>
|
|
30
|
+
bool load(DEVICE& device, nn::layers::avg_pool2d::State& state, GROUP& group) { return true; }
|
|
31
|
+
}
|
|
32
|
+
RL_TOOLS_NAMESPACE_WRAPPER_END
|
|
33
|
+
#endif
|