hyperray 0.0.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hyperdrone/__init__.py +53 -0
- hyperdrone/_cuda/__init__.py +76 -0
- hyperdrone/_dlpack.py +30 -0
- hyperdrone/_jit/__init__.py +131 -0
- hyperdrone/_jit/_build.py +113 -0
- hyperdrone/_jit/_lock.py +23 -0
- hyperdrone/_jit/_patches.py +99 -0
- hyperdrone/_jit/_toolchain.py +17 -0
- hyperdrone/_jit/_workspace.py +94 -0
- hyperdrone/_native/cmake/hyperdrone_jit.cmake +65 -0
- hyperdrone/_native/common/bindings.h +39 -0
- hyperdrone/_native/common/cuda_staging.h +80 -0
- hyperdrone/_native/common/jit_host.h +69 -0
- hyperdrone/_native/common/models.h +24 -0
- hyperdrone/_native/common/verbosity.h +52 -0
- hyperdrone/_native/dynamics/CMakeLists.txt +63 -0
- hyperdrone/_native/dynamics/host.cpp +188 -0
- hyperdrone/_native/dynamics/iface.h +71 -0
- hyperdrone/_native/dynamics/impl.cpp +638 -0
- hyperdrone/_native/env/CMakeLists.txt +98 -0
- hyperdrone/_native/env/environment.cpp +190 -0
- hyperdrone/_native/env/environment.h +282 -0
- hyperdrone/_native/env/impl.cpp +779 -0
- hyperdrone/_native/env/rotorcraft_bindings.cpp +53 -0
- hyperdrone/_native/render/CMakeLists.txt +96 -0
- hyperdrone/_native/render/renderer.cpp +973 -0
- hyperdrone/_native/render/rig_bindings.h +152 -0
- hyperdrone/_native/render/scene_bindings.cpp +515 -0
- hyperdrone/_outputs.py +32 -0
- hyperdrone/_parameters.py +36 -0
- hyperdrone/_vendor/rl-tools/CMakeLists.txt +207 -0
- hyperdrone/_vendor/rl-tools/LICENSE +21 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/all.cmake +34 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/git-diff.cmake +100 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/git-hash.cmake +24 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/summary.cmake +65 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier0-compiler.cmake +18 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier1-blas.cmake +51 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier2-json-hdf5-zlib.cmake +82 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier3-tensorboard.cmake +25 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier4-cuda.cmake +42 -0
- hyperdrone/_vendor/rl-tools/cmake/autodetect/tier5-cli11.cmake +24 -0
- hyperdrone/_vendor/rl-tools/cmake/dependencies/assimp.cmake +19 -0
- hyperdrone/_vendor/rl-tools/cmake/legacy_flags.cmake +33 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/assimp.cmake +30 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/googletest.cmake +20 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/metal.cmake +25 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/mujoco.cmake +89 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/optix.cmake +25 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/raytracing.cmake +105 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/raytracing_generic.cmake +2 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/vulkan.cmake +4 -0
- hyperdrone/_vendor/rl-tools/cmake/optional/webgpu.cmake +24 -0
- hyperdrone/_vendor/rl-tools/cmake/scripts/embed_text.cmake +7 -0
- hyperdrone/_vendor/rl-tools/cmake/scripts/generate-git-snapshot.cmake +138 -0
- hyperdrone/_vendor/rl-tools/include/conta/conta.h +1480 -0
- hyperdrone/_vendor/rl-tools/include/metra/metra.h +381 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/matrix.h +143 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_arm.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu.h +314 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_accelerate.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_blas.h +67 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_mkl.h +38 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cpu_openblas.h +34 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_cuda.h +289 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_dummy.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_esp32.h +29 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_generic.h +944 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/operations_wasm32.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/matrix/persist_code.h +136 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_arm.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu.h +94 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_accelerate.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_blas.h +115 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_mkl.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cpu_openblas.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_cuda.h +713 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/operations_generic.h +1356 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/persist_code.h +130 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/containers/tensor/tensor.h +490 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/arm.h +91 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu.h +210 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_accelerate.h +23 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_blas.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_emscripten.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_mkl.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_openblas.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cpu_tensorboard.h +34 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cuda.h +464 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/cuda_streams.h +23 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/devices.h +105 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/dummy.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/esp32.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/generic.h +0 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/devices/wasm32.h +59 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/model.h +218 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/operations_generic.h +769 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/persist.h +278 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/policy_adapter.h +100 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/policy_adapter_persist.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/dyn/tensor_operations_generic.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/c_backend.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/c_interface.h +36 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/l2f.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/operations_dyn.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/applications/l2f/operations_generic.h +268 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/debugging_pool/c_backend.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/debugging_pool/c_interface.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/c_backend.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/c_interface.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/executor.h +133 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/helper.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/inference/executor/operations_generic.h +219 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_arduino.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_arm.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cpu.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cpu_tensorboard.h +151 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_cuda.h +65 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_dummy.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/logging/operations_wasm32.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_arm.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_cpu.h +138 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_cuda.h +380 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_dummy.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_esp32.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_generic.h +295 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/math/operations_wasm32.h +230 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/mode/mode.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/activation_functions.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/capability.h +61 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/capability/persist_code.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/group.h +99 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/layer.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/operations_cuda.h +64 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/operations_generic.h +186 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/avg_pool2d/persist.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/layer.h +300 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_cpu_mkl.h +590 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_cuda.h +809 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/operations_generic.h +1219 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/persist.h +99 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/conv2d/persist_code.h +170 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/layer.h +145 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_arm/dsp.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_arm/opt.h +173 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_accelerate.h +66 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_blas.h +282 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_mkl.h +66 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cpu_openblas.h +65 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_cuda.h +519 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_dummy.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_esp32/dsp.h +58 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_esp32/opt.h +167 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/operations_generic.h +429 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist.h +62 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist_code.h +178 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dense/persist_common.h +59 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/layer.h +188 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/operations_cuda.h +356 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/operations_generic.h +536 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/dynamic_conv2d/persist.h +32 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/layer.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/operations_generic.h +223 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/embedding/persist.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/layer.h +121 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/operations_generic.h +154 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/persist.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/flatten/persist_code.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/helper_operations_cuda.h +602 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/helper_operations_generic.h +251 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/layer.h +206 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/operations_generic.h +889 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/persist.h +75 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/gru/persist_code.h +199 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/layers.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/layer.h +143 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/operations_cuda.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/operations_generic.h +216 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/max_pool2d/persist.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_accelerate.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_blas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_mkl.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cpu_openblas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_cuda.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_dummy.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/operations_generic.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/layer.h +223 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/operations_cuda.h +138 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/operations_generic.h +446 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/resnet_block/persist.h +70 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/layer.h +154 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/operations_cuda.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/operations_generic.h +502 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/persist.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/sample_and_squash/persist_code.h +173 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/layer.h +116 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/operations_cuda.h +156 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/operations_generic.h +295 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/persist.h +83 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/standardize/persist_code.h +163 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/layer.h +123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/operations_generic.h +272 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/persist.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/td3_sampling/persist_code.h +164 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/layer.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/operations_cuda.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/operations_generic.h +160 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/persist.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/unflatten/persist_code.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/layer.h +132 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/operations_cuda.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/layers/upsample2d/operations_generic.h +230 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/categorical_cross_entropy/operations_generic.h +102 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/mse/operations_cuda.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/mse/operations_generic.h +101 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/loss_functions/operations_generic.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/nn.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_accelerate.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_blas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_mkl.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_mux.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cpu_openblas.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_cuda.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_dummy.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/operations_generic.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/adam.h +121 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_cuda.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/operations_generic.h +150 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/persist.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/instance/persist_code.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_cuda.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/operations_generic.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/adam/persist.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/instance/operations_generic.h +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/lamb.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/lamb/operations_generic.h +68 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/optimizers.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/operations_cuda.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/operations_generic.h +140 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/persist.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/instance/persist_code.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_cuda.h +49 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/operations_generic.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/sgd/sgd.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/optimizers/update.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/operations_cuda.h +0 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/operations_generic.h +98 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/parameters.h +79 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/persist.h +34 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/parameters/persist_code.h +136 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/persist.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn/persist_code.h +27 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/behaviors/skip_parameter_gradients.h +65 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/README.md +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/model.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/group/persist_code.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/network.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_cuda.h +10 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_dummy.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/operations_generic.h +407 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/persist.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp/persist_code.h +137 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/network.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/operations_generic.h +86 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/persist.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/mlp_unconditional_stddev/persist_code.h +142 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/models.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/model.h +148 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/operations_generic.h +288 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/persist.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/multi_agent_wrapper/persist_code.h +71 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_cpu.h +0 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_cuda.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_dummy.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/operations_generic.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/model.h +290 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_cuda.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/operations_generic.h +623 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/persist.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/parallel/persist_code.h +200 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/persist.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/persist_code.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/random_uniform/model.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/random_uniform/operations_generic.h +73 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/resnet/resnet.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/model.h +270 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/operations_generic.h +625 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/persist.h +99 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/nn_models/sequential/persist_code.h +115 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/bf16.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/categories.h +22 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/persist_code.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/numeric_types/policy.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_1.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_2.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm/group_3.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/arm.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_1.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_accelerate.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_1.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mkl.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_mux.h +158 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_openblas.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard/group_3.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cpu_tensorboard.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_1.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda/group_3.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/cuda.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_1.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy/group_3.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/dummy.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_1.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32/group_3.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/esp32.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_1.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_2.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32/group_3.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/operations/wasm32.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/hdf5/hdf5.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/hdf5/operations_cpu.h +419 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/io.h +55 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_cpu.h +58 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_generic.h +620 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/operations_posix.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/backends/tar/tar.h +74 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/persist/code.h +38 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_arm.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_cpu.h +81 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_cuda.h +172 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_dummy.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_esp32.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_generic.h +133 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_generic_array.h +73 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/operations_wasm32.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/random/persist.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/camera.h +105 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/cache.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/free_space.h +60 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/annotations/operations_cpu.h +411 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/glb/glb.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/glb/operations_cpu.h +1288 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/operations_cpu.h +136 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/catalog.h +232 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/conversion.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/operations_cpu.h +123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/datasets/procthor/procthor.h +39 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_cpu.h +717 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/generic/operations_generic.h +1283 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/context.h +193 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/device_source.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/metal/operations_cpu.h +1123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device.h +207 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/device_impl.h +1043 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/operations_cuda.h +1747 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/optix/overlay_accel.h +64 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/specialization.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/context.h +251 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/device_source.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/vulkan/operations_cpu.h +2067 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/bvh_sah.h +182 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/context.h +280 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/device_source.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/backends/webgpu/operations_cpu.h +1405 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_common.h +948 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_mux.h +32 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/operations_cpu_post.h +96 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/renderer.h +484 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/save_cpu.h +314 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/scene.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/transforms_generic.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/raytracing/types.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/operations_cpu.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/operations_generic.h +121 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/rig/rig.h +70 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/scene.h +132 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/segmentation_cpu.h +145 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/transforms.h +204 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rendering/types.h +76 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/algorithms.h +6 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_cpu.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_cpu_mkl.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/operations_generic.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/config.h +243 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_cuda.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/operations_generic.h +205 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/persist.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/loop/core/state.h +51 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/mixed_imitation.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_cuda.h +190 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic.h +332 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/operations_generic_mixed_imitation.h +81 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/persist.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/ppo/ppo.h +105 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/approximators_gru.h +84 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/approximators_mlp.h +61 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/config.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/operations_generic.h +193 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/loop/core/state.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_accelerate.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_mkl.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cpu_mux.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_cuda.h +131 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/operations_generic.h +580 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/sac/sac.h +151 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/approximators_gru.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/approximators_mlp.h +54 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/config.h +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/operations_generic.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/loop/core/state.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_accelerate.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_mkl.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cpu_mux.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_cuda.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/operations_generic.h +359 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/algorithms/td3/td3.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/components.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/off_policy_runner.h +225 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu.h +95 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu_accelerate.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cpu_mkl.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_cuda.h +237 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_generic.h +498 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/off_policy_runner/operations_generic_per_env.h +112 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/collection.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/on_policy_runner.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_accelerate.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_mkl.h +8 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cpu_mux.h +12 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_cuda.h +183 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic.h +366 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/operations_generic_common.h +74 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/on_policy_runner/persist.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu_accelerate.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_cpu_mkl.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/operations_generic.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/operations_cpu.h +9 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/operations_generic.h +123 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/persist.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/replay_buffer/replay_buffer.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/operations_generic.h +76 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/persist.h +31 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/components/running_normalizer/running_normalizer.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/operations_generic.h +58 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/scale_observations/operations_generic.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/scale_observations/wrapper.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environment_wrappers/wrappers.h +29 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/acrobot.h +88 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/operations_cpu.h +152 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/acrobot/operations_generic.h +202 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/environment.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_cuda.h +204 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_generic.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/operations_generic_common.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/batch/persist.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/car.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_cpu.h +110 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_generic.h +206 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/operations_json.h +59 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/track.h +23 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/car/ui.h +189 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/environments.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/environment.h +87 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/operations_cpu.h +212 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/flag/operations_generic.h +215 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/observation.h +75 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/operations_cpu.h +1063 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/operations_cuda.h +564 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/pose.h +253 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/presets.h +154 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/raptor/operations_cpu.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/raptor/operations_generic.h +91 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/raptor/raptor.h +71 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/operations_cpu.h +190 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/operations_generic.h +32 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/rig/rig.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/capture_cpu.h +86 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/capture_cuda.h +69 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/capture_optix.h +163 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cpu.h +223 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cpu_spectator.h +194 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cuda.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/operations_cuda_spectator.h +109 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/spectator.h +82 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/spy.h +107 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/spy/ui.h +30 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/moving_gate.h +103 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/operations_cpu.h +279 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/moving_gate/operations_cuda.h +242 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_cpu.h +322 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_cuda.h +312 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/operations_generic_position_hold.h +128 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/position_hold.h +22 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/target_frame/target_frame.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/baseline.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/calibration.h +62 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/metrics.h +101 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/operations_cpu.h +374 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/tasks/visual_inertial_localization/visual_inertial_localization.h +126 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/hyperdrone/world.h +333 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/inertial_velocity.h +27 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/metrics.h +266 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/multirotor.h +1138 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_cpu.h +2252 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/05_state_is_nan.h +148 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/10_sample_initial_parameters.h +228 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/20_initial_state.h +208 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/30_sample_initial_state.h +300 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/35_get_desired_state.h +63 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/40_observe.h +637 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/50_state_algebra.h +57 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/60_dynamics.h +134 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/70_post_integration.h +368 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic/80_abs_diff.h +312 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic.h +367 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_generic_inertial_velocity.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_helper_generic.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic.h +70 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/operations_multitask_generic_forward.h +24 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/default.h +209 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/arpl.h +112 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/crazyflie.h +127 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/crazyflie_openmv.h +119 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/flightmare.h +111 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/fs.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/mrs.h +110 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/soft.h +117 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/soft_rigid.h +118 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500.h +88 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500_real.h +88 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/dynamics/x500_sim.h +114 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/init/default.h +56 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/registry.h +96 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/default.h +64 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/reward_functions.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/squared/operations_generic.h +202 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/reward_functions/squared/squared.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/termination/default.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/trajectories/lissajous.h +72 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/parameters/trajectories/trajectory.h +78 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/persist.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/persist_code.h +53 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/quaternion_helper.h +103 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/l2f/ui.h +180 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/environment.h +69 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/operations_cpu.h +46 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/memory/operations_generic.h +78 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/README.MD +5 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/ant.h +77 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/model.h +415 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/operations_cpu.h +162 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/persist.h +86 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/ant/ui.h +141 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/mujoco/mujoco.h +1 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/bottleneck.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/operations_cpu.h +289 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/bottleneck/operations_generic.h +495 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/multi_agent/environments.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/observation.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/operations_cpu.h +2 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/operations_generic.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/operations_cpu.h +146 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/operations_generic.h +262 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/pendulum.h +197 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/ui.h +97 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/pendulum/ui_xeus.h +124 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/operations_cpu.h +426 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/operations_generic.h +424 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/environments/reacher/reacher.h +137 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/loop.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/config.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/operations_cpu.h +233 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/persist.h +30 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/checkpoint/state.h +21 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/config.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/operations_generic.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/curriculum/state.h +17 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/config.h +47 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/operations_generic.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/persist.h +40 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/evaluation/state.h +36 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/config.h +22 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/operations_cpu.h +44 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/extrack/state.h +26 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/config.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/operations_cpu.h +113 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/nn_analytics/state.h +24 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/config.h +43 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/operations_cpu.h +190 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/persist.h +30 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/save_trajectories/state.h +37 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/steps.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/config.h +27 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/operations_cpu.h +52 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/persist.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/loop/steps/timing/state.h +25 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/operations_generic.h +3 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/rl.h +5 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/evaluation.h +106 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/operations_cpu.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/evaluation/operations_generic.h +275 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/validation.h +269 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl/utils/validation_analysis.h +85 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/rl_tools.h +80 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/client.h +50 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_boost.h +92 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_cpu.h +174 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/client/operations_websocket.h +208 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/ui_server/server.h +448 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/universe.h +4 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/declarations_cpu.h +13 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/declarations_cpu_emscripten.h +15 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_arm.h +29 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cpu.h +24 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cpu_emscripten.h +28 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_cuda.h +33 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_dummy.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_esp32.h +20 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_generic.h +19 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/assert/operations_wasm32.h +18 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/env/operations_cpu.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/env/operations_generic.h +14 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/extrack/extrack.h +129 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/extrack/operations_cpu.h +588 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/integrators.h +103 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/memcpy.h +16 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/tuple/operations_generic.h +48 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/tuple/tuple.h +147 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/typing.h +122 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/generic/vector_operations.h +172 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/polyak/operations_cuda.h +53 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/polyak/operations_generic.h +93 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/string/operations_generic.h +201 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/utils/zlib/operations_cpu.h +45 -0
- hyperdrone/_vendor/rl-tools/include/rl_tools/version.h +28 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/CMakeLists.txt +15 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/README.md +214 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/CMakeLists.txt +11 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/generic/CMakeLists.txt +17 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/generic/freestanding_check.cpp +134 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/CMakeLists.txt +31 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/device.metal +912 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/metal/metal_cpp_impl.cpp +6 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/CMakeLists.txt +51 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/device.cu +1 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/optix/overlay_accel.cu +308 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/CMakeLists.txt +37 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/device.comp +970 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/vulkan/device_spirv.cpp +44 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/webgpu/CMakeLists.txt +31 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/backends/webgpu/device.wgsl +1381 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/CMakeLists.txt +129 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/README.md +131 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark.cpp +180 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/benchmark_dynamic.cpp +491 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/download_paper_scene.py +74 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/CMakeLists.txt +104 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/Info.plist +36 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/Sources/BenchmarkApp.swift +172 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/benchmark.h +10 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/benchmark.mm +46 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/ios_app/build.sh +17 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/rig.cpp +119 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix.cpp +1382 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix.h +5 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_config.h.in +25 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_identity.cmake +11 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_main.cpp +5 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics.cu +125 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics.h +58 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics_contract.h +179 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/benchmark/simulator_matrix_physics_cpu.cpp +77 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/camera_orbit.h +51 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/CMakeLists.txt +199 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/antialiasing.cpp +214 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone.cpp +320 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/drone_device.cu +359 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/environment.h +96 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/environment/operations_cpu.h +263 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/example.cpp +273 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/fixed_pose.cpp +221 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/flow.cpp +120 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/interactive.cpp +1015 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/make_drone_glb.py +172 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/minimal.cpp +82 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/minimal_overlay.cpp +137 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/motion_blur.cpp +232 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/render_pose_trace.cpp +1829 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/example/render_pose_trace_motion_blur.cpp +647 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/CMakeLists.txt +147 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/README.md +15 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/job.sbatch +28 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model.h +260 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_config.h +24 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_forward_cuda.h +397 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_operations.h +418 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_persist.h +45 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/model_student.h +70 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/scene.cpp +222 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/scene.h +68 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/.gitignore +4 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/CMakeLists.txt +4 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Info.plist +24 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Info_ios.plist +36 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/CameraManager.swift +120 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/ContentView.swift +703 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/DatasetRecorder.swift +285 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/Sources/YawPredictorApp.swift +25 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/YawPredictor.entitlements +8 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/build.sh +66 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/build_ios.sh +133 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/generate.sh +6 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/h5_to_tar.cpp +82 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/inference.cpp +166 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/inference.h +26 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/project.yml +30 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/swift_app/test_tar_vs_hdf5.cpp +173 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_cuda.cu +699 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_dataset_overlay.cpp +475 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_distill_cuda.cu +995 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_eval.cu +457 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_real_world_eval.cpp +660 -0
- hyperdrone/_vendor/rl-tools/src/rendering/raytracing/yaw_prediction/yaw_prediction_viewer.cu +443 -0
- hyperdrone/_vendor/rl-tools/src/rl/environments/hyperdrone/spy/CMakeLists.txt +63 -0
- hyperdrone/_vendor/rl-tools/src/rl/environments/hyperdrone/spy/example.cpp +101 -0
- hyperdrone/_vendor/rl-tools/src/rl/environments/hyperdrone/spy/ui.cpp +380 -0
- hyperdrone/dynamics/__init__.py +5 -0
- hyperdrone/dynamics/_component.py +31 -0
- hyperdrone/dynamics/_config.py +46 -0
- hyperdrone/dynamics/_sim.py +166 -0
- hyperdrone/env/__init__.py +23 -0
- hyperdrone/env/_multi_environment.py +566 -0
- hyperdrone/env/_rotorcraft.py +29 -0
- hyperdrone/env/_spy.py +39 -0
- hyperdrone/examples/.gitignore +3 -0
- hyperdrone/examples/Benchmark.ipynb +113 -0
- hyperdrone/examples/HyperDrone.ipynb +589 -0
- hyperdrone/examples/Orbiter.ipynb +496 -0
- hyperdrone/examples/Renderer.ipynb +218 -0
- hyperdrone/examples/__init__.py +16 -0
- hyperdrone/examples/articulation.py +55 -0
- hyperdrone/examples/benchmark.py +236 -0
- hyperdrone/examples/benchmark_minimal.py +65 -0
- hyperdrone/examples/data.py +71 -0
- hyperdrone/examples/drone_flythrough.py +169 -0
- hyperdrone/examples/hyperdrone_videos/my_world_preview.h +17 -0
- hyperdrone/examples/my_world.h +17 -0
- hyperdrone/examples/render_procthor.py +40 -0
- hyperdrone/examples/shots.py +108 -0
- hyperdrone/examples/spy.py +40 -0
- hyperdrone/examples/visual_inertial_localization.py +158 -0
- hyperdrone/gym/__init__.py +67 -0
- hyperdrone/render/__init__.py +57 -0
- hyperdrone/render/_component.py +51 -0
- hyperdrone/render/_config.py +76 -0
- hyperdrone/render/_renderer.py +498 -0
- hyperdrone/render/_rig.py +136 -0
- hyperdrone/render/_sampling.py +69 -0
- hyperdrone/render/_scene.py +38 -0
- hyperdrone/render/datasets.py +15 -0
- hyperray-0.0.1.dist-info/METADATA +519 -0
- hyperray-0.0.1.dist-info/RECORD +788 -0
- hyperray-0.0.1.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,1382 @@
|
|
|
1
|
+
#define RL_TOOLS_RENDERING_RAYTRACING_DISABLE_PROBE_RAYS 1
|
|
2
|
+
|
|
3
|
+
#include <rl_tools/operations/cpu_mux.h>
|
|
4
|
+
#include <rl_tools/rendering/raytracing/operations_cpu_mux.h>
|
|
5
|
+
#include <rl_tools/rendering/datasets/glb/operations_cpu.h>
|
|
6
|
+
#include <rl_tools/rendering/raytracing/save_cpu.h>
|
|
7
|
+
#include <metra/metra.h>
|
|
8
|
+
#include <rl_tools/utils/extrack/extrack.h>
|
|
9
|
+
#include <nlohmann/json.hpp>
|
|
10
|
+
|
|
11
|
+
#include "simulator_matrix_config.h"
|
|
12
|
+
#include "simulator_matrix.h"
|
|
13
|
+
#include "simulator_matrix_physics.h"
|
|
14
|
+
|
|
15
|
+
#include <algorithm>
|
|
16
|
+
#include <cerrno>
|
|
17
|
+
#include <chrono>
|
|
18
|
+
#include <cmath>
|
|
19
|
+
#include <cstdlib>
|
|
20
|
+
#include <cstdint>
|
|
21
|
+
#include <cstring>
|
|
22
|
+
#include <filesystem>
|
|
23
|
+
#include <fstream>
|
|
24
|
+
#include <iomanip>
|
|
25
|
+
#include <iostream>
|
|
26
|
+
#include <limits>
|
|
27
|
+
#include <random>
|
|
28
|
+
#include <sstream>
|
|
29
|
+
#include <stdexcept>
|
|
30
|
+
#include <string>
|
|
31
|
+
#include <thread>
|
|
32
|
+
#include <type_traits>
|
|
33
|
+
#include <utility>
|
|
34
|
+
#include <vector>
|
|
35
|
+
|
|
36
|
+
namespace rlt = rl_tools;
|
|
37
|
+
using namespace rl_tools;
|
|
38
|
+
using CONFIG = rlt::rendering::raytracing::benchmark::Config;
|
|
39
|
+
using BenchmarkMode = rlt::rendering::raytracing::benchmark::Mode;
|
|
40
|
+
using T = float;
|
|
41
|
+
using TI = int;
|
|
42
|
+
using DEVICE = rlt::devices::DEVICE_FACTORY<>;
|
|
43
|
+
using RUNTIME = rlt::rendering::raytracing::Runtime<>;
|
|
44
|
+
using ShadingProfile = CONFIG::SHADING;
|
|
45
|
+
static constexpr T FOV = 80;
|
|
46
|
+
static constexpr const char* BACKEND_NAME = rlt::rendering::raytracing::backends::Name<rlt::rendering::raytracing::backends::Default>::VALUE;
|
|
47
|
+
static constexpr TI NUM_ENVS = CONFIG::NUM_CAMERAS;
|
|
48
|
+
static constexpr TI CAM_WIDTH = CONFIG::RESOLUTION;
|
|
49
|
+
static constexpr TI CAM_HEIGHT = CONFIG::RESOLUTION;
|
|
50
|
+
static constexpr const char* OBJECTS20_LAYOUT_NAME = "canonical_staggered_v1";
|
|
51
|
+
static constexpr const char* PAPER_SCENE_SHA1 = "7f1c9129532798e0b63bc41edb6b4c09251cf8a0";
|
|
52
|
+
namespace paper = rlt::rendering::raytracing::benchmark;
|
|
53
|
+
static constexpr const char* PHYSICS_BACKEND_NAME = CONFIG::PHYSICS_BACKEND == paper::PhysicsBackend::cuda ? "cuda"
|
|
54
|
+
: (CONFIG::PHYSICS_BACKEND == paper::PhysicsBackend::cpu ? "cpu" : "none");
|
|
55
|
+
|
|
56
|
+
template <typename SPEC>
|
|
57
|
+
using CameraBuffer = rlt::Tensor<typename rlt::rendering::raytracing::Renderer<SPEC>::CAMERA_TENSOR_SPEC>;
|
|
58
|
+
|
|
59
|
+
template <bool T_OUTPUT_RGB, bool T_OUTPUT_DEPTH, TI T_WIDTH = CAM_WIDTH, TI T_HEIGHT = CAM_HEIGHT, TI T_NUM_CAMERAS = NUM_ENVS, typename T_SHADING = ShadingProfile, bool T_ENABLE_AA = false, TI T_AA_GRID_SIZE = 1>
|
|
60
|
+
struct BenchmarkConfig: rlt::rendering::raytracing::config::Default<T, TI>{
|
|
61
|
+
static constexpr TI CAM_WIDTH = T_WIDTH, CAM_HEIGHT = T_HEIGHT, NUM_CAMERAS = T_NUM_CAMERAS, NUM_PROBES = 0;
|
|
62
|
+
using SHADING = T_SHADING;
|
|
63
|
+
static constexpr bool OUTPUT_RGB = T_OUTPUT_RGB;
|
|
64
|
+
static constexpr bool OUTPUT_DEPTH = T_OUTPUT_DEPTH;
|
|
65
|
+
static constexpr bool ENABLE_ANTI_ALIASING = T_ENABLE_AA;
|
|
66
|
+
static constexpr TI ANTI_ALIASING_GRID_SIZE = T_AA_GRID_SIZE;
|
|
67
|
+
};
|
|
68
|
+
template <bool T_OUTPUT_RGB, bool T_OUTPUT_DEPTH, typename T_SHADING = ShadingProfile>
|
|
69
|
+
using BenchmarkSpec = rlt::rendering::raytracing::Specification<BenchmarkConfig<T_OUTPUT_RGB, T_OUTPUT_DEPTH, CAM_WIDTH, CAM_HEIGHT, NUM_ENVS, T_SHADING>>;
|
|
70
|
+
template <bool T_OUTPUT_RGB, bool T_OUTPUT_DEPTH, TI T_WIDTH, TI T_HEIGHT, TI T_NUM_CAMERAS, typename T_SHADING, bool T_ENABLE_AA, TI T_AA_GRID_SIZE>
|
|
71
|
+
using SweepBenchmarkSpec = rlt::rendering::raytracing::Specification<BenchmarkConfig<T_OUTPUT_RGB, T_OUTPUT_DEPTH, T_WIDTH, T_HEIGHT, T_NUM_CAMERAS, T_SHADING, T_ENABLE_AA, T_AA_GRID_SIZE>>;
|
|
72
|
+
|
|
73
|
+
static constexpr long long SWEEP_REFERENCE_PIXELS = static_cast<long long>(NUM_ENVS) * static_cast<long long>(CAM_WIDTH) * static_cast<long long>(CAM_HEIGHT);
|
|
74
|
+
|
|
75
|
+
template <TI T_RESOLUTION>
|
|
76
|
+
struct SweepCameraCount {
|
|
77
|
+
static constexpr long long RESOLUTION_PIXELS = static_cast<long long>(T_RESOLUTION) * static_cast<long long>(T_RESOLUTION);
|
|
78
|
+
static constexpr long long RAW = SWEEP_REFERENCE_PIXELS / RESOLUTION_PIXELS;
|
|
79
|
+
static constexpr TI VALUE = static_cast<TI>(RAW > 1 ? RAW : 1);
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
enum class SceneAxis { OBJECTS_20, PROCTHOR };
|
|
83
|
+
enum class OutputAxis { RGB, DEPTH };
|
|
84
|
+
enum class OrientationMode { LOOK_AT_SCENE_JITTER, RANDOM_YAW_PITCH, UNIFORM_SO3 };
|
|
85
|
+
|
|
86
|
+
struct CameraOffset {
|
|
87
|
+
T x;
|
|
88
|
+
T y;
|
|
89
|
+
T z;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
static CameraOffset camera_offset(SceneAxis scene) {
|
|
93
|
+
return scene == SceneAxis::OBJECTS_20
|
|
94
|
+
? CameraOffset{static_cast<T>(0), static_cast<T>(0), static_cast<T>(0)}
|
|
95
|
+
: CameraOffset{static_cast<T>(-3.92), static_cast<T>(-5.67), static_cast<T>(1.0)};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
struct Options {
|
|
99
|
+
std::string scene = CONFIG::PAPER ? "all" : "procthor";
|
|
100
|
+
std::string output = CONFIG::PAPER ? "all" : "rgb";
|
|
101
|
+
std::string workload = CONFIG::PAPER ? "all" : "render_only";
|
|
102
|
+
std::string fidelity = CONFIG::PAPER ? "all" : "medium";
|
|
103
|
+
std::string orientation_mode = "uniform_so3";
|
|
104
|
+
std::string output_dir = ".";
|
|
105
|
+
std::string output_png;
|
|
106
|
+
std::string output_jsonl;
|
|
107
|
+
std::string procthor_path = CONFIG::PAPER ? CONFIG::PAPER_SCENE : "conta:75d1d67a17ecd16bc3a214baa895240da8060df7";
|
|
108
|
+
double seconds = CONFIG::PAPER ? 20.0 : 10.0;
|
|
109
|
+
double warmup_seconds = 2.0;
|
|
110
|
+
double cooldown_seconds = 10.0;
|
|
111
|
+
int iterations = 0;
|
|
112
|
+
int repeats = CONFIG::PAPER ? 3 : 1;
|
|
113
|
+
int repeat = 1;
|
|
114
|
+
int sync_interval = 10;
|
|
115
|
+
int sweep_config_start = 0;
|
|
116
|
+
int sweep_config_count = -1;
|
|
117
|
+
uint32_t seed = 0;
|
|
118
|
+
bool has_position = false;
|
|
119
|
+
bool has_forward = false;
|
|
120
|
+
bool has_look_at = false;
|
|
121
|
+
bool has_up = false;
|
|
122
|
+
bool has_orientation = false;
|
|
123
|
+
T position[3] = {-3.92f, -5.67f, 1.0f};
|
|
124
|
+
T forward[3] = {1.0f, 0.0f, 0.0f};
|
|
125
|
+
T look_at[3] = {0.0f, 0.0f, 0.0f};
|
|
126
|
+
T up[3] = {0.0f, 0.0f, 1.0f};
|
|
127
|
+
T orientation_wxyz[4] = {1.0f, 0.0f, 0.0f, 0.0f};
|
|
128
|
+
};
|
|
129
|
+
|
|
130
|
+
struct CameraPose {
|
|
131
|
+
T direction[3];
|
|
132
|
+
T up[3];
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
struct BenchmarkResult {
|
|
136
|
+
int iterations;
|
|
137
|
+
double elapsed_s;
|
|
138
|
+
double frames_per_s;
|
|
139
|
+
double pixels_per_s;
|
|
140
|
+
double primary_mrays_per_s;
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
static bool has_prefix(const std::string& value, const char* prefix) {
|
|
145
|
+
return value.compare(0, std::strlen(prefix), prefix) == 0;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
static std::string value_after_prefix(const std::string& value, const char* prefix) {
|
|
149
|
+
return value.substr(std::strlen(prefix));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
static void print_help(const char* argv0) {
|
|
153
|
+
std::cout << "Usage: " << argv0 << " [options]\n"
|
|
154
|
+
<< " --output <rgb|depth|all> Default: " << (CONFIG::PAPER ? "all" : "rgb") << "\n"
|
|
155
|
+
<< " --output-dir <dir> Verification images (default: .)\n"
|
|
156
|
+
<< " --procthor-path <file|conta:hash> Default: pinned ProcTHOR-Train-1\n";
|
|
157
|
+
if constexpr (CONFIG::MODE == BenchmarkMode::frame) {
|
|
158
|
+
std::cout
|
|
159
|
+
<< " --output-png <file> Requires one output; otherwise named automatically\n"
|
|
160
|
+
<< " --position-flu X Y Z\n"
|
|
161
|
+
<< " --forward-flu X Y Z\n"
|
|
162
|
+
<< " --look-at-flu X Y Z\n"
|
|
163
|
+
<< " --up-flu X Y Z\n"
|
|
164
|
+
<< " --orientation-flu-wxyz W X Y Z\n";
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
std::cout
|
|
168
|
+
<< " --scene <procthor|20_objects|all> Default: " << (CONFIG::PAPER ? "all" : "procthor") << "\n"
|
|
169
|
+
<< " --orientation-mode <uniform_so3|random_yaw_pitch|look_at_scene_jitter>\n"
|
|
170
|
+
<< " --seed <count> Default: 0\n"
|
|
171
|
+
<< " --seconds <seconds> Timed duration per case (default: " << (CONFIG::PAPER ? 20 : 10) << ")\n"
|
|
172
|
+
<< " --iterations <count> Fixed count overriding duration (default: 0)\n"
|
|
173
|
+
<< " --warmup-seconds <seconds> Default: 2; 0 runs " << (CONFIG::PAPER ? 10 : 1) << " warmup iterations\n"
|
|
174
|
+
<< " --sync-interval <count> Default: 10\n"
|
|
175
|
+
<< " Compiled cameras: " << NUM_ENVS << ", resolution: " << CAM_WIDTH << "x" << CAM_HEIGHT << "\n";
|
|
176
|
+
}
|
|
177
|
+
if constexpr (CONFIG::MODE == BenchmarkMode::sweep) {
|
|
178
|
+
std::cout
|
|
179
|
+
<< " --cooldown-seconds <seconds> Between configurations (default: 10)\n"
|
|
180
|
+
<< " --sweep-config-start <index> First configuration (default: 0)\n"
|
|
181
|
+
<< " --sweep-config-count <count> <=0 selects all remaining configurations\n";
|
|
182
|
+
}
|
|
183
|
+
if constexpr (CONFIG::PAPER) {
|
|
184
|
+
std::cout << " --fidelity <low|medium|high|all> Default: all\n"
|
|
185
|
+
<< " --workload <render_only|render_physics_static|render_physics_coupled|all>\n"
|
|
186
|
+
<< " Default: all = render_only + render_physics_static (24 cells across all axes)\n"
|
|
187
|
+
<< " Physics backend: " << PHYSICS_BACKEND_NAME << " (selected at build time).\n"
|
|
188
|
+
<< " --repeats <count> Complete matrix passes (default: 3, 72 measurements)\n"
|
|
189
|
+
<< " Results are also saved to a timestamped .jsonl file in --output-dir.\n"
|
|
190
|
+
<< " ProcTHOR must match the May asset; download_paper_scene.py fetches it.\n";
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
static bool parse_int(const std::string& value, int& out) {
|
|
195
|
+
char* end = nullptr;
|
|
196
|
+
errno = 0;
|
|
197
|
+
long parsed = std::strtol(value.c_str(), &end, 10);
|
|
198
|
+
if(errno == ERANGE || end == value.c_str() || *end != '\0' || parsed < std::numeric_limits<int>::min() || parsed > std::numeric_limits<int>::max()) {
|
|
199
|
+
return false;
|
|
200
|
+
}
|
|
201
|
+
out = static_cast<int>(parsed);
|
|
202
|
+
return true;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
static bool parse_double(const std::string& value, double& out) {
|
|
206
|
+
// Reject non-finite spellings before conversion: fast-math can eliminate floating-point checks.
|
|
207
|
+
if(value.empty() || value.find_first_not_of("0123456789+-.eE") != std::string::npos) {
|
|
208
|
+
return false;
|
|
209
|
+
}
|
|
210
|
+
char* end = nullptr;
|
|
211
|
+
errno = 0;
|
|
212
|
+
const double parsed = std::strtod(value.c_str(), &end);
|
|
213
|
+
if(errno == ERANGE || end == value.c_str() || *end != '\0') {
|
|
214
|
+
return false;
|
|
215
|
+
}
|
|
216
|
+
out = parsed;
|
|
217
|
+
return true;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
template <std::size_t N>
|
|
221
|
+
static bool get_vector_option(int& i, int argc, char** argv, const std::string& arg,
|
|
222
|
+
const char* name, T (&out)[N], bool& seen) {
|
|
223
|
+
const std::string prefix = std::string(name) + "=";
|
|
224
|
+
const bool csv = has_prefix(arg, prefix.c_str());
|
|
225
|
+
if(!csv && arg != name) {
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
if(!csv && i + static_cast<int>(N) >= argc) {
|
|
229
|
+
std::cerr << "Missing values for " << name << std::endl;
|
|
230
|
+
return false;
|
|
231
|
+
}
|
|
232
|
+
std::istringstream values(csv ? arg.substr(prefix.size()) : "");
|
|
233
|
+
for(std::size_t component = 0; component < N; component++) {
|
|
234
|
+
std::string value;
|
|
235
|
+
if(csv) {
|
|
236
|
+
if(!std::getline(values, value, ',')) {
|
|
237
|
+
return false;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
value = argv[++i];
|
|
242
|
+
}
|
|
243
|
+
double parsed;
|
|
244
|
+
if(!parse_double(value, parsed) || std::abs(parsed) > std::numeric_limits<T>::max()) {
|
|
245
|
+
std::cerr << "Invalid " << name << " component: " << value << std::endl;
|
|
246
|
+
return false;
|
|
247
|
+
}
|
|
248
|
+
out[component] = static_cast<T>(parsed);
|
|
249
|
+
}
|
|
250
|
+
if(csv && !values.eof()) {
|
|
251
|
+
return false;
|
|
252
|
+
}
|
|
253
|
+
seen = true;
|
|
254
|
+
return true;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
static bool get_option_value(int& i, int argc, char** argv, const std::string& arg, const char* name, std::string& out) {
|
|
258
|
+
std::string eq_prefix = std::string(name) + "=";
|
|
259
|
+
if(has_prefix(arg, eq_prefix.c_str())) {
|
|
260
|
+
out = value_after_prefix(arg, eq_prefix.c_str());
|
|
261
|
+
return true;
|
|
262
|
+
}
|
|
263
|
+
if(arg == name) {
|
|
264
|
+
if(i + 1 >= argc) {
|
|
265
|
+
std::cerr << "Missing value for " << name << std::endl;
|
|
266
|
+
return false;
|
|
267
|
+
}
|
|
268
|
+
out = argv[++i];
|
|
269
|
+
return true;
|
|
270
|
+
}
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
static bool parse_options(int argc, char** argv, Options& options) {
|
|
275
|
+
for(int i = 1; i < argc; i++) {
|
|
276
|
+
std::string arg = argv[i];
|
|
277
|
+
std::string value;
|
|
278
|
+
if(arg == "-h" || arg == "--help") {
|
|
279
|
+
print_help(argv[0]);
|
|
280
|
+
std::exit(0);
|
|
281
|
+
}
|
|
282
|
+
else if(CONFIG::MODE != BenchmarkMode::frame && get_option_value(i, argc, argv, arg, "--scene", value)) {
|
|
283
|
+
options.scene = value;
|
|
284
|
+
}
|
|
285
|
+
else if(get_option_value(i, argc, argv, arg, "--output", value)) {
|
|
286
|
+
options.output = value;
|
|
287
|
+
}
|
|
288
|
+
else if(CONFIG::PAPER && get_option_value(i, argc, argv, arg, "--workload", value)) {
|
|
289
|
+
options.workload = value;
|
|
290
|
+
}
|
|
291
|
+
else if(CONFIG::PAPER && get_option_value(i, argc, argv, arg, "--fidelity", value)) {
|
|
292
|
+
options.fidelity = value;
|
|
293
|
+
}
|
|
294
|
+
else if(CONFIG::PAPER && get_option_value(i, argc, argv, arg, "--repeats", value)) {
|
|
295
|
+
if(!parse_int(value, options.repeats) || options.repeats <= 0) {
|
|
296
|
+
std::cerr << "Invalid --repeats (must be > 0): " << value << std::endl;
|
|
297
|
+
return false;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
else if(CONFIG::MODE != BenchmarkMode::frame && get_option_value(i, argc, argv, arg, "--orientation-mode", value)) {
|
|
301
|
+
options.orientation_mode = value;
|
|
302
|
+
}
|
|
303
|
+
else if(get_option_value(i, argc, argv, arg, "--output-dir", value)) {
|
|
304
|
+
options.output_dir = value;
|
|
305
|
+
}
|
|
306
|
+
else if(CONFIG::MODE == BenchmarkMode::frame && get_option_value(i, argc, argv, arg, "--output-png", value)) {
|
|
307
|
+
options.output_png = value;
|
|
308
|
+
}
|
|
309
|
+
else if(get_option_value(i, argc, argv, arg, "--procthor-path", value)) {
|
|
310
|
+
options.procthor_path = value;
|
|
311
|
+
}
|
|
312
|
+
else if(CONFIG::MODE == BenchmarkMode::frame && get_vector_option(i, argc, argv, arg, "--position-flu", options.position, options.has_position)) {
|
|
313
|
+
}
|
|
314
|
+
else if(CONFIG::MODE == BenchmarkMode::frame && get_vector_option(i, argc, argv, arg, "--forward-flu", options.forward, options.has_forward)) {
|
|
315
|
+
}
|
|
316
|
+
else if(CONFIG::MODE == BenchmarkMode::frame && get_vector_option(i, argc, argv, arg, "--look-at-flu", options.look_at, options.has_look_at)) {
|
|
317
|
+
}
|
|
318
|
+
else if(CONFIG::MODE == BenchmarkMode::frame && get_vector_option(i, argc, argv, arg, "--up-flu", options.up, options.has_up)) {
|
|
319
|
+
}
|
|
320
|
+
else if(CONFIG::MODE == BenchmarkMode::frame && get_vector_option(i, argc, argv, arg, "--orientation-flu-wxyz", options.orientation_wxyz, options.has_orientation)) {
|
|
321
|
+
}
|
|
322
|
+
else if(CONFIG::MODE != BenchmarkMode::frame && get_option_value(i, argc, argv, arg, "--seconds", value)) {
|
|
323
|
+
if(!parse_double(value, options.seconds)) {
|
|
324
|
+
std::cerr << "Invalid --seconds: " << value << std::endl;
|
|
325
|
+
return false;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
else if(CONFIG::MODE != BenchmarkMode::frame && get_option_value(i, argc, argv, arg, "--iterations", value)) {
|
|
329
|
+
if(!parse_int(value, options.iterations)) {
|
|
330
|
+
std::cerr << "Invalid --iterations: " << value << std::endl;
|
|
331
|
+
return false;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
else if(CONFIG::MODE != BenchmarkMode::frame && get_option_value(i, argc, argv, arg, "--warmup-seconds", value)) {
|
|
335
|
+
if(!parse_double(value, options.warmup_seconds)) {
|
|
336
|
+
std::cerr << "Invalid --warmup-seconds: " << value << std::endl;
|
|
337
|
+
return false;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
else if(CONFIG::MODE == BenchmarkMode::sweep && get_option_value(i, argc, argv, arg, "--cooldown-seconds", value)) {
|
|
341
|
+
if(!parse_double(value, options.cooldown_seconds)) {
|
|
342
|
+
std::cerr << "Invalid --cooldown-seconds: " << value << std::endl;
|
|
343
|
+
return false;
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
else if(CONFIG::MODE == BenchmarkMode::sweep && get_option_value(i, argc, argv, arg, "--sweep-config-start", value)) {
|
|
347
|
+
if(!parse_int(value, options.sweep_config_start)) {
|
|
348
|
+
std::cerr << "Invalid --sweep-config-start: " << value << std::endl;
|
|
349
|
+
return false;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
else if(CONFIG::MODE == BenchmarkMode::sweep && get_option_value(i, argc, argv, arg, "--sweep-config-count", value)) {
|
|
353
|
+
if(!parse_int(value, options.sweep_config_count)) {
|
|
354
|
+
std::cerr << "Invalid --sweep-config-count: " << value << std::endl;
|
|
355
|
+
return false;
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
else if(CONFIG::MODE != BenchmarkMode::frame && get_option_value(i, argc, argv, arg, "--sync-interval", value)) {
|
|
359
|
+
if(!parse_int(value, options.sync_interval)) {
|
|
360
|
+
std::cerr << "Invalid --sync-interval: " << value << std::endl;
|
|
361
|
+
return false;
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
else if(CONFIG::MODE != BenchmarkMode::frame && get_option_value(i, argc, argv, arg, "--seed", value)) {
|
|
365
|
+
int parsed_seed = 0;
|
|
366
|
+
if(!parse_int(value, parsed_seed) || parsed_seed < 0) {
|
|
367
|
+
std::cerr << "Invalid --seed: " << value << std::endl;
|
|
368
|
+
return false;
|
|
369
|
+
}
|
|
370
|
+
options.seed = static_cast<uint32_t>(parsed_seed);
|
|
371
|
+
}
|
|
372
|
+
else {
|
|
373
|
+
std::cerr << "Unknown argument: " << arg << std::endl;
|
|
374
|
+
return false;
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
if(options.fidelity != "low" && options.fidelity != "medium" && options.fidelity != "high" && options.fidelity != "all") {
|
|
379
|
+
std::cerr << "Unsupported --fidelity: " << options.fidelity << std::endl;
|
|
380
|
+
return false;
|
|
381
|
+
}
|
|
382
|
+
if(options.workload != "render_only" && options.workload != "render_physics_static"
|
|
383
|
+
&& options.workload != "render_physics_coupled" && options.workload != "all") {
|
|
384
|
+
std::cerr << "Unsupported --workload: " << options.workload << std::endl;
|
|
385
|
+
return false;
|
|
386
|
+
}
|
|
387
|
+
if(!CONFIG::PHYSICS_AVAILABLE && options.workload != "render_only") {
|
|
388
|
+
std::cerr << "This target has no physics backend; use --workload render_only." << std::endl;
|
|
389
|
+
return false;
|
|
390
|
+
}
|
|
391
|
+
if(CONFIG::PAPER && options.orientation_mode != "uniform_so3") {
|
|
392
|
+
std::cerr << "The paper contract requires --orientation-mode uniform_so3." << std::endl;
|
|
393
|
+
return false;
|
|
394
|
+
}
|
|
395
|
+
if(!options.output_png.empty() && options.output == "all") {
|
|
396
|
+
std::cerr << "--output-png requires --output rgb or depth." << std::endl;
|
|
397
|
+
return false;
|
|
398
|
+
}
|
|
399
|
+
if(options.has_forward && options.has_look_at) {
|
|
400
|
+
std::cerr << "Use only one of --forward-flu or --look-at-flu." << std::endl;
|
|
401
|
+
return false;
|
|
402
|
+
}
|
|
403
|
+
if(options.has_orientation && (options.has_forward || options.has_look_at || options.has_up)) {
|
|
404
|
+
std::cerr << "Use --orientation-flu-wxyz without forward, look-at, or up vectors." << std::endl;
|
|
405
|
+
return false;
|
|
406
|
+
}
|
|
407
|
+
if(options.iterations < 0 || (options.seconds <= 0 && options.iterations == 0)) {
|
|
408
|
+
std::cerr << "Either --seconds must be > 0 or --iterations must be > 0." << std::endl;
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
if(options.warmup_seconds < 0) {
|
|
412
|
+
std::cerr << "--warmup-seconds must be >= 0." << std::endl;
|
|
413
|
+
return false;
|
|
414
|
+
}
|
|
415
|
+
if(options.cooldown_seconds < 0) {
|
|
416
|
+
std::cerr << "--cooldown-seconds must be >= 0." << std::endl;
|
|
417
|
+
return false;
|
|
418
|
+
}
|
|
419
|
+
if(options.sweep_config_start < 0) {
|
|
420
|
+
std::cerr << "--sweep-config-start must be >= 0." << std::endl;
|
|
421
|
+
return false;
|
|
422
|
+
}
|
|
423
|
+
if(options.sync_interval <= 0) {
|
|
424
|
+
std::cerr << "--sync-interval must be > 0." << std::endl;
|
|
425
|
+
return false;
|
|
426
|
+
}
|
|
427
|
+
if(options.orientation_mode != "random_yaw_pitch" &&
|
|
428
|
+
options.orientation_mode != "look_at_scene_jitter" &&
|
|
429
|
+
options.orientation_mode != "uniform_so3") {
|
|
430
|
+
std::cerr << "Unsupported --orientation-mode: " << options.orientation_mode << std::endl;
|
|
431
|
+
return false;
|
|
432
|
+
}
|
|
433
|
+
return true;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
static const char* scene_name(SceneAxis scene) {
|
|
437
|
+
return scene == SceneAxis::OBJECTS_20 ? "20_objects" : "procthor";
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
template <typename SPEC>
|
|
441
|
+
static constexpr const char* shading_profile_name_for_spec() {
|
|
442
|
+
return std::is_base_of<rlt::rendering::raytracing::Low, typename SPEC::SHADING>::value ? "low"
|
|
443
|
+
: (std::is_same<typename SPEC::SHADING, rlt::rendering::raytracing::VeryHigh>::value ? "very_high"
|
|
444
|
+
: (std::is_base_of<rlt::rendering::raytracing::High, typename SPEC::SHADING>::value ? "high" : "medium"));
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
template <typename SPEC>
|
|
448
|
+
static std::string anti_aliasing_name_for_spec() {
|
|
449
|
+
return SPEC::ENABLE_ANTI_ALIASING ? std::string("aa") + std::to_string(SPEC::ANTI_ALIASING_GRID_SIZE) : std::string("none");
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
template <typename SPEC>
|
|
453
|
+
static constexpr int samples_per_pixel_for_spec() {
|
|
454
|
+
return SPEC::HAS_DEPTH ? 1 : SPEC::RGB_SAMPLES;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
template <typename SPEC>
|
|
458
|
+
static constexpr const char* output_name_for_spec() {
|
|
459
|
+
return SPEC::HAS_DEPTH ? "depth" : "rgb";
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
static bool select_scenes(const std::string& requested, std::vector<SceneAxis>& scenes) {
|
|
463
|
+
if(requested == "all") {
|
|
464
|
+
scenes = {SceneAxis::OBJECTS_20, SceneAxis::PROCTHOR};
|
|
465
|
+
}
|
|
466
|
+
else if(requested == "20_objects") {
|
|
467
|
+
scenes = {SceneAxis::OBJECTS_20};
|
|
468
|
+
}
|
|
469
|
+
else if(requested == "procthor") {
|
|
470
|
+
scenes = {SceneAxis::PROCTHOR};
|
|
471
|
+
}
|
|
472
|
+
else {
|
|
473
|
+
std::cerr << "Unsupported --scene: " << requested << std::endl;
|
|
474
|
+
return false;
|
|
475
|
+
}
|
|
476
|
+
return true;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
static bool select_outputs(const std::string& requested, std::vector<OutputAxis>& outputs) {
|
|
480
|
+
if(requested == "all") {
|
|
481
|
+
outputs = {OutputAxis::RGB, OutputAxis::DEPTH};
|
|
482
|
+
}
|
|
483
|
+
else if(requested == "rgb") {
|
|
484
|
+
outputs = {OutputAxis::RGB};
|
|
485
|
+
}
|
|
486
|
+
else if(requested == "depth") {
|
|
487
|
+
outputs = {OutputAxis::DEPTH};
|
|
488
|
+
}
|
|
489
|
+
else {
|
|
490
|
+
std::cerr << "Unsupported --output: " << requested << std::endl;
|
|
491
|
+
return false;
|
|
492
|
+
}
|
|
493
|
+
return true;
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
static bool ensure_output_dir(const std::string& dir) {
|
|
497
|
+
std::error_code error;
|
|
498
|
+
std::filesystem::create_directories(dir, error);
|
|
499
|
+
if(error) {
|
|
500
|
+
std::cerr << "Cannot create output directory '" << dir << "': " << error.message() << std::endl;
|
|
501
|
+
return false;
|
|
502
|
+
}
|
|
503
|
+
return true;
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
static std::string sanitize_label(const std::string& input) {
|
|
507
|
+
std::string out;
|
|
508
|
+
for(char ch : input) {
|
|
509
|
+
if((ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || (ch >= '0' && ch <= '9')) {
|
|
510
|
+
out.push_back(ch);
|
|
511
|
+
}
|
|
512
|
+
else if(ch == '-' || ch == '_') {
|
|
513
|
+
out.push_back(ch);
|
|
514
|
+
}
|
|
515
|
+
else if(ch == ' ' || ch == '/' || ch == '+') {
|
|
516
|
+
out.push_back('-');
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
return out.empty() ? "gpu" : out;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
static std::string join_path(const std::string& dir, const std::string& file) {
|
|
523
|
+
if(dir.empty() || dir == ".") {
|
|
524
|
+
return file;
|
|
525
|
+
}
|
|
526
|
+
if(dir[dir.size() - 1] == '/') {
|
|
527
|
+
return dir + file;
|
|
528
|
+
}
|
|
529
|
+
return dir + "/" + file;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
static void add_box(rlt::rendering::raytracing::Object& objects20, T cx, T cy, T cz, T sx, T sy, T sz, T r, T g, T b) {
|
|
533
|
+
rlt::rendering::raytracing::Mesh md;
|
|
534
|
+
md.color[0] = r;
|
|
535
|
+
md.color[1] = g;
|
|
536
|
+
md.color[2] = b;
|
|
537
|
+
const T x0 = cx - sx * static_cast<T>(0.5);
|
|
538
|
+
const T x1 = cx + sx * static_cast<T>(0.5);
|
|
539
|
+
const T y0 = cy - sy * static_cast<T>(0.5);
|
|
540
|
+
const T y1 = cy + sy * static_cast<T>(0.5);
|
|
541
|
+
const T z0 = cz - sz * static_cast<T>(0.5);
|
|
542
|
+
const T z1 = cz + sz * static_cast<T>(0.5);
|
|
543
|
+
const T vertices[] = {
|
|
544
|
+
x0, y0, z0, x1, y0, z0, x1, y1, z0, x0, y1, z0,
|
|
545
|
+
x0, y0, z1, x1, y0, z1, x1, y1, z1, x0, y1, z1
|
|
546
|
+
};
|
|
547
|
+
const int indices[] = {
|
|
548
|
+
0, 1, 2, 0, 2, 3,
|
|
549
|
+
4, 6, 5, 4, 7, 6,
|
|
550
|
+
0, 4, 5, 0, 5, 1,
|
|
551
|
+
1, 5, 6, 1, 6, 2,
|
|
552
|
+
2, 6, 7, 2, 7, 3,
|
|
553
|
+
3, 7, 4, 3, 4, 0
|
|
554
|
+
};
|
|
555
|
+
md.vertices.assign(vertices, vertices + sizeof(vertices) / sizeof(vertices[0]));
|
|
556
|
+
md.indices.assign(indices, indices + sizeof(indices) / sizeof(indices[0]));
|
|
557
|
+
objects20.meshes.push_back(std::move(md));
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
static void add_sphere(rlt::rendering::raytracing::Object& objects20, T cx, T cy, T cz, T radius, T r, T g, T b) {
|
|
561
|
+
static constexpr int SEGMENTS = 16;
|
|
562
|
+
static constexpr int RINGS = 8;
|
|
563
|
+
static constexpr T PI = static_cast<T>(3.14159265358979323846);
|
|
564
|
+
rlt::rendering::raytracing::Mesh md;
|
|
565
|
+
md.color[0] = r;
|
|
566
|
+
md.color[1] = g;
|
|
567
|
+
md.color[2] = b;
|
|
568
|
+
md.vertices.reserve(static_cast<size_t>((RINGS + 1) * SEGMENTS * 3));
|
|
569
|
+
md.normals.reserve(static_cast<size_t>((RINGS + 1) * SEGMENTS * 3));
|
|
570
|
+
md.indices.reserve(static_cast<size_t>(RINGS * SEGMENTS * 6));
|
|
571
|
+
|
|
572
|
+
for(int ring = 0; ring <= RINGS; ring++) {
|
|
573
|
+
const T theta = PI * static_cast<T>(ring) / static_cast<T>(RINGS);
|
|
574
|
+
const T sin_theta = std::sin(theta);
|
|
575
|
+
const T cos_theta = std::cos(theta);
|
|
576
|
+
for(int segment = 0; segment < SEGMENTS; segment++) {
|
|
577
|
+
const T phi = static_cast<T>(2) * PI * static_cast<T>(segment) / static_cast<T>(SEGMENTS);
|
|
578
|
+
const T nx = sin_theta * std::cos(phi);
|
|
579
|
+
const T ny = sin_theta * std::sin(phi);
|
|
580
|
+
const T nz = cos_theta;
|
|
581
|
+
md.vertices.push_back(cx + radius * nx);
|
|
582
|
+
md.vertices.push_back(cy + radius * ny);
|
|
583
|
+
md.vertices.push_back(cz + radius * nz);
|
|
584
|
+
md.normals.push_back(nx);
|
|
585
|
+
md.normals.push_back(ny);
|
|
586
|
+
md.normals.push_back(nz);
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
for(int ring = 0; ring < RINGS; ring++) {
|
|
591
|
+
for(int segment = 0; segment < SEGMENTS; segment++) {
|
|
592
|
+
const int next_segment = (segment + 1) % SEGMENTS;
|
|
593
|
+
const int a = ring * SEGMENTS + segment;
|
|
594
|
+
const int b = ring * SEGMENTS + next_segment;
|
|
595
|
+
const int c = (ring + 1) * SEGMENTS + next_segment;
|
|
596
|
+
const int d = (ring + 1) * SEGMENTS + segment;
|
|
597
|
+
md.indices.push_back(a);
|
|
598
|
+
md.indices.push_back(d);
|
|
599
|
+
md.indices.push_back(c);
|
|
600
|
+
md.indices.push_back(a);
|
|
601
|
+
md.indices.push_back(c);
|
|
602
|
+
md.indices.push_back(b);
|
|
603
|
+
}
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
objects20.meshes.push_back(std::move(md));
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
struct Objects20Position {
|
|
610
|
+
T x;
|
|
611
|
+
T y;
|
|
612
|
+
T z;
|
|
613
|
+
};
|
|
614
|
+
|
|
615
|
+
static constexpr Objects20Position OBJECTS20_POSITIONS[] = {
|
|
616
|
+
{-1.5f, -2.0f, 0.35f},
|
|
617
|
+
{-0.4f, -2.5f, 0.55f},
|
|
618
|
+
{0.9f, -2.2f, 0.45f},
|
|
619
|
+
{2.2f, -1.8f, 0.70f},
|
|
620
|
+
{3.2f, -0.8f, 0.35f},
|
|
621
|
+
{-2.2f, -0.9f, 0.60f},
|
|
622
|
+
{-0.9f, -0.8f, 0.45f},
|
|
623
|
+
{0.4f, -0.6f, 0.80f},
|
|
624
|
+
{1.8f, -0.3f, 0.50f},
|
|
625
|
+
{3.0f, 0.4f, 0.65f},
|
|
626
|
+
{-2.9f, 0.6f, 0.45f},
|
|
627
|
+
{-1.4f, 0.8f, 0.75f},
|
|
628
|
+
{0.1f, 1.0f, 0.50f},
|
|
629
|
+
{1.4f, 1.2f, 0.60f},
|
|
630
|
+
{2.8f, 1.5f, 0.40f},
|
|
631
|
+
{-2.4f, 2.2f, 0.70f},
|
|
632
|
+
{-0.8f, 2.4f, 0.35f},
|
|
633
|
+
{0.8f, 2.5f, 0.75f},
|
|
634
|
+
{2.2f, 2.4f, 0.45f},
|
|
635
|
+
{3.4f, 2.0f, 0.65f},
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
static void objects20_scale(int i, T& sx, T& sy, T& sz) {
|
|
639
|
+
if((i % 2) == 0) {
|
|
640
|
+
sx = static_cast<T>(0.35 + 0.05 * (i % 3));
|
|
641
|
+
sy = static_cast<T>(0.45 + 0.04 * ((i + 1) % 4));
|
|
642
|
+
sz = static_cast<T>(0.55 + 0.05 * ((i + 2) % 5));
|
|
643
|
+
}
|
|
644
|
+
else {
|
|
645
|
+
const T radius_scale = static_cast<T>(0.45 + 0.04 * (i % 4));
|
|
646
|
+
sx = radius_scale;
|
|
647
|
+
sy = radius_scale;
|
|
648
|
+
sz = radius_scale;
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
static void objects20_color(int i, T& r, T& g, T& b) {
|
|
653
|
+
static constexpr T palette[][3] = {
|
|
654
|
+
{0.85f, 0.20f, 0.18f},
|
|
655
|
+
{0.15f, 0.48f, 0.88f},
|
|
656
|
+
{0.95f, 0.72f, 0.20f},
|
|
657
|
+
{0.18f, 0.64f, 0.39f},
|
|
658
|
+
{0.70f, 0.34f, 0.82f},
|
|
659
|
+
};
|
|
660
|
+
const int index = i % 5;
|
|
661
|
+
r = palette[index][0];
|
|
662
|
+
g = palette[index][1];
|
|
663
|
+
b = palette[index][2];
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
static void make_20_object_scene(rlt::rendering::raytracing::Scene& render_scene) {
|
|
667
|
+
render_scene = {};
|
|
668
|
+
rlt::rendering::raytracing::Object objects20;
|
|
669
|
+
for(int i = 0; i < 20; i++) {
|
|
670
|
+
T sx, sy, sz, r, g, b;
|
|
671
|
+
objects20_scale(i, sx, sy, sz);
|
|
672
|
+
objects20_color(i, r, g, b);
|
|
673
|
+
const auto& position = OBJECTS20_POSITIONS[i];
|
|
674
|
+
if((i % 2) == 0) {
|
|
675
|
+
add_box(objects20, position.x, position.y, position.z, sx, sy, sz, r, g, b);
|
|
676
|
+
}
|
|
677
|
+
else {
|
|
678
|
+
add_sphere(objects20, position.x, position.y, position.z, sx * static_cast<T>(0.5), r, g, b);
|
|
679
|
+
}
|
|
680
|
+
}
|
|
681
|
+
render_scene.objects.push_back(std::move(objects20));
|
|
682
|
+
render_scene.instances.push_back({0, {1,0,0,0, 0,1,0,0, 0,0,1,0}, true});
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
// the 20-object benchmark scene uses hand-picked bounds (closer orbit than the AABB-derived
|
|
686
|
+
// camera radius); they are baked into the bundle metadata before init so the renderer
|
|
687
|
+
// consumes them uniformly (probe budget, depth max), keeping outputs comparable across
|
|
688
|
+
// revisions (max_ray_length = 12 matches the previous camera_radius = 6 depth max)
|
|
689
|
+
static void apply_20_object_bounds(rlt::rendering::SceneMetadata<T>& metadata) {
|
|
690
|
+
metadata.center[0] = static_cast<T>(0.25);
|
|
691
|
+
metadata.center[1] = 0;
|
|
692
|
+
metadata.center[2] = static_cast<T>(0.60);
|
|
693
|
+
metadata.half_extent[0] = static_cast<T>(3.65);
|
|
694
|
+
metadata.half_extent[1] = static_cast<T>(2.75);
|
|
695
|
+
metadata.half_extent[2] = static_cast<T>(0.95);
|
|
696
|
+
metadata.max_ray_length = static_cast<T>(12.0);
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
static void normalize(T v[3]) {
|
|
700
|
+
const T norm = std::sqrt(v[0] * v[0] + v[1] * v[1] + v[2] * v[2]);
|
|
701
|
+
if(norm < static_cast<T>(1e-6)) {
|
|
702
|
+
v[0] = static_cast<T>(1);
|
|
703
|
+
v[1] = static_cast<T>(0);
|
|
704
|
+
v[2] = static_cast<T>(0);
|
|
705
|
+
return;
|
|
706
|
+
}
|
|
707
|
+
v[0] /= norm;
|
|
708
|
+
v[1] /= norm;
|
|
709
|
+
v[2] /= norm;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
static void normalize_quaternion(T q[4]) {
|
|
713
|
+
const T norm = std::sqrt(q[0] * q[0] + q[1] * q[1] + q[2] * q[2] + q[3] * q[3]);
|
|
714
|
+
if(norm < static_cast<T>(1e-6)) {
|
|
715
|
+
q[0] = static_cast<T>(1);
|
|
716
|
+
q[1] = static_cast<T>(0);
|
|
717
|
+
q[2] = static_cast<T>(0);
|
|
718
|
+
q[3] = static_cast<T>(0);
|
|
719
|
+
return;
|
|
720
|
+
}
|
|
721
|
+
q[0] /= norm;
|
|
722
|
+
q[1] /= norm;
|
|
723
|
+
q[2] /= norm;
|
|
724
|
+
q[3] /= norm;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
static void cross(const T a[3], const T b[3], T out[3]) {
|
|
728
|
+
out[0] = a[1] * b[2] - a[2] * b[1];
|
|
729
|
+
out[1] = a[2] * b[0] - a[0] * b[2];
|
|
730
|
+
out[2] = a[0] * b[1] - a[1] * b[0];
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
static void rotate_by_quaternion(T w, T x, T y, T z, const T v[3], T out[3]) {
|
|
734
|
+
const T qv[3] = {x, y, z};
|
|
735
|
+
T t[3];
|
|
736
|
+
cross(qv, v, t);
|
|
737
|
+
t[0] *= static_cast<T>(2);
|
|
738
|
+
t[1] *= static_cast<T>(2);
|
|
739
|
+
t[2] *= static_cast<T>(2);
|
|
740
|
+
T q_cross_t[3];
|
|
741
|
+
cross(qv, t, q_cross_t);
|
|
742
|
+
out[0] = v[0] + w * t[0] + q_cross_t[0];
|
|
743
|
+
out[1] = v[1] + w * t[1] + q_cross_t[1];
|
|
744
|
+
out[2] = v[2] + w * t[2] + q_cross_t[2];
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
template <typename SPEC>
|
|
748
|
+
static std::vector<CameraPose> make_camera_poses(const rlt::rendering::SceneMetadata<T>& metadata, SceneAxis scene, const Options& options) {
|
|
749
|
+
static constexpr T PI = static_cast<T>(3.14159265358979323846);
|
|
750
|
+
const auto mode = options.orientation_mode == "look_at_scene_jitter" ? OrientationMode::LOOK_AT_SCENE_JITTER
|
|
751
|
+
: (options.orientation_mode == "uniform_so3" ? OrientationMode::UNIFORM_SO3 : OrientationMode::RANDOM_YAW_PITCH);
|
|
752
|
+
std::vector<CameraPose> poses(SPEC::NUM_CAMERAS);
|
|
753
|
+
std::mt19937 rng(options.seed);
|
|
754
|
+
std::uniform_real_distribution<T> unit_dist(static_cast<T>(0), static_cast<T>(1));
|
|
755
|
+
std::uniform_real_distribution<T> look_at_yaw_dist(static_cast<T>(-0.08), static_cast<T>(0.08));
|
|
756
|
+
std::uniform_real_distribution<T> look_at_pitch_dist(static_cast<T>(-0.06), static_cast<T>(0.06));
|
|
757
|
+
std::uniform_real_distribution<T> yaw_dist(-PI, PI);
|
|
758
|
+
std::uniform_real_distribution<T> pitch_dist(static_cast<T>(-0.35), static_cast<T>(0.35));
|
|
759
|
+
|
|
760
|
+
const CameraOffset offset = camera_offset(scene);
|
|
761
|
+
const T eye[3] = {offset.x, offset.y, offset.z};
|
|
762
|
+
const T target[3] = {metadata.center[0], metadata.center[1], metadata.center[2]};
|
|
763
|
+
const T world_up[3] = {static_cast<T>(0), static_cast<T>(0), static_cast<T>(1)};
|
|
764
|
+
|
|
765
|
+
T look_at_forward[3] = {
|
|
766
|
+
target[0] - eye[0],
|
|
767
|
+
target[1] - eye[1],
|
|
768
|
+
target[2] - eye[2]
|
|
769
|
+
};
|
|
770
|
+
normalize(look_at_forward);
|
|
771
|
+
T look_at_right[3];
|
|
772
|
+
cross(look_at_forward, world_up, look_at_right);
|
|
773
|
+
normalize(look_at_right);
|
|
774
|
+
|
|
775
|
+
for(int i = 0; i < static_cast<int>(SPEC::NUM_CAMERAS); i++) {
|
|
776
|
+
CameraPose& pose = poses[i];
|
|
777
|
+
if(mode == OrientationMode::LOOK_AT_SCENE_JITTER) {
|
|
778
|
+
const T yaw_offset = look_at_yaw_dist(rng);
|
|
779
|
+
const T pitch_offset = look_at_pitch_dist(rng);
|
|
780
|
+
pose.direction[0] = look_at_forward[0] + yaw_offset * look_at_right[0] + pitch_offset * world_up[0];
|
|
781
|
+
pose.direction[1] = look_at_forward[1] + yaw_offset * look_at_right[1] + pitch_offset * world_up[1];
|
|
782
|
+
pose.direction[2] = look_at_forward[2] + yaw_offset * look_at_right[2] + pitch_offset * world_up[2];
|
|
783
|
+
normalize(pose.direction);
|
|
784
|
+
pose.up[0] = world_up[0];
|
|
785
|
+
pose.up[1] = world_up[1];
|
|
786
|
+
pose.up[2] = world_up[2];
|
|
787
|
+
}
|
|
788
|
+
else if(mode == OrientationMode::UNIFORM_SO3) {
|
|
789
|
+
const T u1 = unit_dist(rng);
|
|
790
|
+
const T u2 = unit_dist(rng);
|
|
791
|
+
const T u3 = unit_dist(rng);
|
|
792
|
+
const T qx = std::sqrt(static_cast<T>(1) - u1) * std::sin(static_cast<T>(2) * PI * u2);
|
|
793
|
+
const T qy = std::sqrt(static_cast<T>(1) - u1) * std::cos(static_cast<T>(2) * PI * u2);
|
|
794
|
+
const T qz = std::sqrt(u1) * std::sin(static_cast<T>(2) * PI * u3);
|
|
795
|
+
const T qw = std::sqrt(u1) * std::cos(static_cast<T>(2) * PI * u3);
|
|
796
|
+
const T local_forward[3] = {static_cast<T>(1), static_cast<T>(0), static_cast<T>(0)};
|
|
797
|
+
const T local_up[3] = {static_cast<T>(0), static_cast<T>(0), static_cast<T>(1)};
|
|
798
|
+
rotate_by_quaternion(qw, qx, qy, qz, local_forward, pose.direction);
|
|
799
|
+
rotate_by_quaternion(qw, qx, qy, qz, local_up, pose.up);
|
|
800
|
+
normalize(pose.direction);
|
|
801
|
+
normalize(pose.up);
|
|
802
|
+
}
|
|
803
|
+
else {
|
|
804
|
+
const T yaw = yaw_dist(rng);
|
|
805
|
+
const T pitch = pitch_dist(rng);
|
|
806
|
+
const T cp = std::cos(pitch);
|
|
807
|
+
const T sp = std::sin(pitch);
|
|
808
|
+
const T cy = std::cos(yaw);
|
|
809
|
+
const T sy = std::sin(yaw);
|
|
810
|
+
pose.direction[0] = cp * cy;
|
|
811
|
+
pose.direction[1] = cp * sy;
|
|
812
|
+
pose.direction[2] = sp;
|
|
813
|
+
pose.up[0] = -sp * cy;
|
|
814
|
+
pose.up[1] = -sp * sy;
|
|
815
|
+
pose.up[2] = cp;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
return poses;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
template <typename DEVICE, typename SPEC>
|
|
822
|
+
static void write_cameras(DEVICE& device, rlt::rendering::raytracing::Renderer<SPEC>& renderer, SceneAxis scene, const std::vector<CameraPose>& poses) {
|
|
823
|
+
const CameraOffset offset = camera_offset(scene);
|
|
824
|
+
const T eye[3] = {offset.x, offset.y, offset.z};
|
|
825
|
+
const T aspect = static_cast<T>(SPEC::CAM_WIDTH) / static_cast<T>(SPEC::CAM_HEIGHT);
|
|
826
|
+
rlt::Tensor<typename decltype(renderer.cameras)::SPEC> camera_staging;
|
|
827
|
+
malloc(device, camera_staging);
|
|
828
|
+
for(int i = 0; i < static_cast<int>(SPEC::NUM_CAMERAS); i++) {
|
|
829
|
+
const CameraPose& pose = poses[i];
|
|
830
|
+
const T look_at[3] = {
|
|
831
|
+
eye[0] + pose.direction[0],
|
|
832
|
+
eye[1] + pose.direction[1],
|
|
833
|
+
eye[2] + pose.direction[2]
|
|
834
|
+
};
|
|
835
|
+
data(camera_staging)[i] = make_camera_data(eye, look_at, pose.up, FOV, aspect);
|
|
836
|
+
}
|
|
837
|
+
copy(device, renderer.device, camera_staging, cameras(device, renderer));
|
|
838
|
+
free(device, camera_staging);
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
template <typename DEVICE, typename SPEC>
|
|
842
|
+
static void write_single_camera(DEVICE& device, rlt::rendering::raytracing::Renderer<SPEC>& renderer, const T eye[3], const CameraPose& pose) {
|
|
843
|
+
static_assert(SPEC::NUM_CAMERAS == 1, "single-frame target must be compiled with one camera");
|
|
844
|
+
const T aspect = static_cast<T>(SPEC::CAM_WIDTH) / static_cast<T>(SPEC::CAM_HEIGHT);
|
|
845
|
+
const T look_at[3] = {
|
|
846
|
+
eye[0] + pose.direction[0],
|
|
847
|
+
eye[1] + pose.direction[1],
|
|
848
|
+
eye[2] + pose.direction[2]
|
|
849
|
+
};
|
|
850
|
+
rlt::Tensor<typename decltype(renderer.cameras)::SPEC> staging;
|
|
851
|
+
malloc(device, staging);
|
|
852
|
+
data(staging)[0] = make_camera_data(eye, look_at, pose.up, FOV, aspect);
|
|
853
|
+
copy(device, renderer.device, staging, cameras(device, renderer));
|
|
854
|
+
free(device, staging);
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
[[maybe_unused]] static CameraPose make_single_frame_pose(const rlt::rendering::SceneMetadata<T>& metadata, const Options& options) {
|
|
858
|
+
CameraPose pose{};
|
|
859
|
+
const T eye[3] = {options.position[0], options.position[1], options.position[2]};
|
|
860
|
+
if(options.has_orientation) {
|
|
861
|
+
T q[4] = {
|
|
862
|
+
options.orientation_wxyz[0],
|
|
863
|
+
options.orientation_wxyz[1],
|
|
864
|
+
options.orientation_wxyz[2],
|
|
865
|
+
options.orientation_wxyz[3]
|
|
866
|
+
};
|
|
867
|
+
normalize_quaternion(q);
|
|
868
|
+
const T local_forward[3] = {static_cast<T>(1), static_cast<T>(0), static_cast<T>(0)};
|
|
869
|
+
const T local_up[3] = {static_cast<T>(0), static_cast<T>(0), static_cast<T>(1)};
|
|
870
|
+
rotate_by_quaternion(q[0], q[1], q[2], q[3], local_forward, pose.direction);
|
|
871
|
+
rotate_by_quaternion(q[0], q[1], q[2], q[3], local_up, pose.up);
|
|
872
|
+
}
|
|
873
|
+
else if(options.has_forward) {
|
|
874
|
+
pose.direction[0] = options.forward[0];
|
|
875
|
+
pose.direction[1] = options.forward[1];
|
|
876
|
+
pose.direction[2] = options.forward[2];
|
|
877
|
+
}
|
|
878
|
+
else {
|
|
879
|
+
const T* target = options.has_look_at ? options.look_at : metadata.center;
|
|
880
|
+
pose.direction[0] = target[0] - eye[0];
|
|
881
|
+
pose.direction[1] = target[1] - eye[1];
|
|
882
|
+
pose.direction[2] = target[2] - eye[2];
|
|
883
|
+
}
|
|
884
|
+
normalize(pose.direction);
|
|
885
|
+
if(!options.has_orientation) {
|
|
886
|
+
pose.up[0] = options.up[0];
|
|
887
|
+
pose.up[1] = options.up[1];
|
|
888
|
+
pose.up[2] = options.up[2];
|
|
889
|
+
}
|
|
890
|
+
normalize(pose.up);
|
|
891
|
+
return pose;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
template <typename DEVICE, typename SPEC>
|
|
895
|
+
static void step_paper_physics(DEVICE& device, rlt::rendering::raytracing::Renderer<SPEC>& renderer,
|
|
896
|
+
paper::PhysicsSimulation& physics, CameraBuffer<SPEC>& physics_cameras,
|
|
897
|
+
const Options& options, int iteration) {
|
|
898
|
+
if constexpr (CONFIG::PHYSICS_AVAILABLE) {
|
|
899
|
+
if(options.workload != "render_only") {
|
|
900
|
+
if constexpr (CONFIG::PHYSICS_BACKEND == paper::PhysicsBackend::cuda) {
|
|
901
|
+
void* destination = options.workload == "render_physics_coupled" ? data(cameras(device, renderer)) : nullptr;
|
|
902
|
+
if(!physics_step_cameras(device, physics, destination, stream(device, renderer), iteration)) {
|
|
903
|
+
throw std::runtime_error(physics_last_error(device, physics));
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
else {
|
|
907
|
+
auto* destination = options.workload == "render_physics_coupled" ? data(physics_cameras) : nullptr;
|
|
908
|
+
if(!physics_step_cameras(device, physics, destination, iteration)) {
|
|
909
|
+
throw std::runtime_error(physics_last_error(device, physics));
|
|
910
|
+
}
|
|
911
|
+
if(options.workload == "render_physics_coupled") {
|
|
912
|
+
copy(device, renderer.device, physics_cameras, cameras(device, renderer));
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
}
|
|
916
|
+
}
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
template <typename DEVICE, typename SPEC>
|
|
920
|
+
static BenchmarkResult run_benchmark(DEVICE& device, rlt::rendering::raytracing::Renderer<SPEC>& renderer,
|
|
921
|
+
const Options& options, paper::PhysicsSimulation& physics,
|
|
922
|
+
CameraBuffer<SPEC>& physics_cameras) {
|
|
923
|
+
using Clock = std::chrono::steady_clock;
|
|
924
|
+
const auto warmup_start = Clock::now();
|
|
925
|
+
int warmup_iterations = 0;
|
|
926
|
+
do {
|
|
927
|
+
step_paper_physics(device, renderer, physics, physics_cameras, options, warmup_iterations++);
|
|
928
|
+
render(device, renderer);
|
|
929
|
+
} while(options.warmup_seconds > 0
|
|
930
|
+
? std::chrono::duration<double>(Clock::now() - warmup_start).count() < options.warmup_seconds
|
|
931
|
+
: warmup_iterations < (CONFIG::PAPER ? 10 : 1));
|
|
932
|
+
|
|
933
|
+
synchronize(device, renderer);
|
|
934
|
+
if constexpr (CONFIG::PHYSICS_AVAILABLE) {
|
|
935
|
+
if(!synchronize_physics(device, physics)) {
|
|
936
|
+
throw std::runtime_error(physics_last_error(device, physics));
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
const auto start = Clock::now();
|
|
940
|
+
int iterations = 0;
|
|
941
|
+
for(;;) {
|
|
942
|
+
step_paper_physics(device, renderer, physics, physics_cameras, options, iterations);
|
|
943
|
+
render_launch(device, renderer);
|
|
944
|
+
iterations++;
|
|
945
|
+
if(iterations % options.sync_interval == 0) {
|
|
946
|
+
render_sync(device, renderer);
|
|
947
|
+
if(options.iterations == 0 && std::chrono::duration<double>(Clock::now() - start).count() >= options.seconds) {
|
|
948
|
+
break;
|
|
949
|
+
}
|
|
950
|
+
}
|
|
951
|
+
if(options.iterations > 0 && iterations == options.iterations) {
|
|
952
|
+
break;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
synchronize(device, renderer);
|
|
956
|
+
if constexpr (CONFIG::PHYSICS_AVAILABLE) {
|
|
957
|
+
if(!synchronize_physics(device, physics)) {
|
|
958
|
+
throw std::runtime_error(physics_last_error(device, physics));
|
|
959
|
+
}
|
|
960
|
+
}
|
|
961
|
+
const double elapsed = std::chrono::duration<double>(Clock::now() - start).count();
|
|
962
|
+
const double frames = static_cast<double>(iterations) * SPEC::NUM_CAMERAS;
|
|
963
|
+
const double pixels = frames * SPEC::CAM_PIXELS;
|
|
964
|
+
return {iterations, elapsed, frames / elapsed, pixels / elapsed,
|
|
965
|
+
pixels * samples_per_pixel_for_spec<SPEC>() / (1e6 * elapsed)};
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
template <typename SPEC, typename DEVICE>
|
|
969
|
+
static bool setup_scene(DEVICE& device, rlt::rendering::Bundle<T>& bundle, SceneAxis scene, const Options& options) {
|
|
970
|
+
if(scene == SceneAxis::OBJECTS_20) {
|
|
971
|
+
make_20_object_scene(bundle.scene);
|
|
972
|
+
apply_20_object_bounds(bundle.metadata);
|
|
973
|
+
return true;
|
|
974
|
+
}
|
|
975
|
+
if constexpr (CONFIG::PAPER) {
|
|
976
|
+
std::string hash;
|
|
977
|
+
if(!conta::detail::sha1_file(options.procthor_path, hash) || hash != PAPER_SCENE_SHA1) {
|
|
978
|
+
std::cerr << "Paper ProcTHOR asset missing or mismatched: " << options.procthor_path
|
|
979
|
+
<< ". Run download_paper_scene.py; expected SHA1 " << PAPER_SCENE_SHA1 << std::endl;
|
|
980
|
+
return false;
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
rlt::log(device, device.logger, "Loading ProcTHOR scene: ", options.procthor_path);
|
|
984
|
+
return load<typename SPEC::SHADING, SPEC::HAS_RGB>(device, bundle, options.procthor_path);
|
|
985
|
+
}
|
|
986
|
+
|
|
987
|
+
template <typename DEVICE, typename SPEC>
|
|
988
|
+
static void save_verification_image(DEVICE& device, rlt::rendering::raytracing::Renderer<SPEC>& renderer, const std::string& filename) {
|
|
989
|
+
if constexpr (SPEC::HAS_DEPTH) {
|
|
990
|
+
save_depth_image(device, renderer, filename.c_str());
|
|
991
|
+
}
|
|
992
|
+
else {
|
|
993
|
+
save_image(device, renderer, filename.c_str());
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
|
|
997
|
+
template <typename VALUE>
|
|
998
|
+
static std::string number(VALUE value) {
|
|
999
|
+
std::ostringstream out;
|
|
1000
|
+
out << std::setprecision(std::numeric_limits<double>::max_digits10) << value;
|
|
1001
|
+
return out.str();
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
static std::string vector_string(const T* values, int count) {
|
|
1005
|
+
std::string result;
|
|
1006
|
+
for(int i = 0; i < count; i++) {
|
|
1007
|
+
if(i > 0) {
|
|
1008
|
+
result += ' ';
|
|
1009
|
+
}
|
|
1010
|
+
result += number(values[i]);
|
|
1011
|
+
}
|
|
1012
|
+
return result;
|
|
1013
|
+
}
|
|
1014
|
+
|
|
1015
|
+
template <typename SPEC>
|
|
1016
|
+
static std::string case_name(SceneAxis scene, const Options& options, const std::string& device,
|
|
1017
|
+
const std::string& scene_id, const CameraPose* pose) {
|
|
1018
|
+
std::string orientation = options.orientation_mode + "_seed" + std::to_string(options.seed);
|
|
1019
|
+
if(pose != nullptr) {
|
|
1020
|
+
const std::string camera = vector_string(options.position, 3) + ";"
|
|
1021
|
+
+ vector_string(pose->direction, 3) + ";" + vector_string(pose->up, 3);
|
|
1022
|
+
conta::detail::Sha1 hash;
|
|
1023
|
+
hash.update(reinterpret_cast<const unsigned char*>(camera.data()), camera.size());
|
|
1024
|
+
orientation = "pose" + hash.finalize().substr(0, 12);
|
|
1025
|
+
}
|
|
1026
|
+
const std::string prefix = CONFIG::PAPER ? "paper_may2026_" + options.workload + "_"
|
|
1027
|
+
: (CONFIG::MODE == BenchmarkMode::frame ? "frame_" : "render_");
|
|
1028
|
+
return prefix + BACKEND_NAME + "_"
|
|
1029
|
+
+ sanitize_label(device) + "_" + scene_name(scene) + "_" + scene_id + "_" + output_name_for_spec<SPEC>() + "_"
|
|
1030
|
+
+ shading_profile_name_for_spec<SPEC>() + "_" + anti_aliasing_name_for_spec<SPEC>() + "_"
|
|
1031
|
+
+ std::to_string(SPEC::NUM_CAMERAS) + "views_" + std::to_string(SPEC::CAM_WIDTH) + "x"
|
|
1032
|
+
+ std::to_string(SPEC::CAM_HEIGHT) + "_" + orientation;
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
template <typename SPEC>
|
|
1036
|
+
static bool report(SceneAxis scene, const Options& options, const std::string& device,
|
|
1037
|
+
const BenchmarkResult& result, const std::string& image, const std::string& scene_id,
|
|
1038
|
+
const std::string& identity, const CameraPose* pose) {
|
|
1039
|
+
const auto offset = camera_offset(scene);
|
|
1040
|
+
const T eye[3] = {offset.x, offset.y, offset.z};
|
|
1041
|
+
const std::string reference = scene == SceneAxis::PROCTHOR ? options.procthor_path : OBJECTS20_LAYOUT_NAME;
|
|
1042
|
+
const bool frame = CONFIG::MODE == BenchmarkMode::frame;
|
|
1043
|
+
const T* position = frame ? options.position : eye;
|
|
1044
|
+
nlohmann::json record = {
|
|
1045
|
+
{"schema", "render-v1"},
|
|
1046
|
+
{"workload", frame ? "frame" : options.workload},
|
|
1047
|
+
{"backend", BACKEND_NAME},
|
|
1048
|
+
{"device", device},
|
|
1049
|
+
{"scene", scene_name(scene)},
|
|
1050
|
+
{"scene_source", reference},
|
|
1051
|
+
{"scene_id", scene_id},
|
|
1052
|
+
{"output", output_name_for_spec<SPEC>()},
|
|
1053
|
+
{"shading_profile", shading_profile_name_for_spec<SPEC>()},
|
|
1054
|
+
{"num_cameras", SPEC::NUM_CAMERAS},
|
|
1055
|
+
{"width", SPEC::CAM_WIDTH},
|
|
1056
|
+
{"height", SPEC::CAM_HEIGHT},
|
|
1057
|
+
{"fov_degrees", FOV},
|
|
1058
|
+
{"aa_grid_size", SPEC::ANTI_ALIASING_GRID_SIZE},
|
|
1059
|
+
{"samples_per_pixel", samples_per_pixel_for_spec<SPEC>()},
|
|
1060
|
+
{"motion_blur", false},
|
|
1061
|
+
{"num_probes", SPEC::NUM_PROBES},
|
|
1062
|
+
{"camera_position_flu", {position[0], position[1], position[2]}},
|
|
1063
|
+
{"orientation_mode", frame ? "explicit" : options.orientation_mode},
|
|
1064
|
+
{"camera_forward_flu", pose == nullptr ? nlohmann::json(nullptr) : nlohmann::json(pose->direction)},
|
|
1065
|
+
{"camera_up_flu", pose == nullptr ? nlohmann::json(nullptr) : nlohmann::json(pose->up)},
|
|
1066
|
+
{"seed", options.seed},
|
|
1067
|
+
{"warmup_seconds", frame ? 0.0 : options.warmup_seconds},
|
|
1068
|
+
{"sync_interval", frame ? 1 : options.sync_interval},
|
|
1069
|
+
{"iterations", result.iterations},
|
|
1070
|
+
{"elapsed_s", result.elapsed_s},
|
|
1071
|
+
{"frames_per_s", result.frames_per_s},
|
|
1072
|
+
{"pixels_per_s", result.pixels_per_s},
|
|
1073
|
+
{"primary_mrays_per_s", result.primary_mrays_per_s},
|
|
1074
|
+
{"verification_png", image}
|
|
1075
|
+
};
|
|
1076
|
+
if constexpr (CONFIG::PAPER) {
|
|
1077
|
+
record["benchmark_contract"] = "hyperdrone-paper-may2026";
|
|
1078
|
+
record["repeat"] = options.repeat;
|
|
1079
|
+
record["repeats"] = options.repeats;
|
|
1080
|
+
record["physics_backend"] = options.workload == "render_only" ? nlohmann::json(nullptr) : nlohmann::json(PHYSICS_BACKEND_NAME);
|
|
1081
|
+
record["rltools_commit"] = RL_TOOLS_STRINGIFY(RL_TOOLS_COMMIT_HASH);
|
|
1082
|
+
record["workload_source_sha256"] = CONFIG::WORKLOAD_SOURCE_SHA256;
|
|
1083
|
+
#ifdef RL_TOOLS_EXTRACK_GIT_DIFF
|
|
1084
|
+
record["rltools_commit"] = rlt::utils::extrack::git::rl_tools::commit;
|
|
1085
|
+
record["tracked_source_dirty"] = rlt::utils::extrack::git::rl_tools::diff[0] != '\0'
|
|
1086
|
+
|| rlt::utils::extrack::git::rl_tools::diff_staged[0] != '\0';
|
|
1087
|
+
#else
|
|
1088
|
+
record["tracked_source_dirty"] = nullptr;
|
|
1089
|
+
#endif
|
|
1090
|
+
record["historical_source_commit"] = options.workload == "render_physics_coupled"
|
|
1091
|
+
? "6c7fc4c6e0c912c451e40856b80740e65f129635" : "10bee5cdc6616e6c42c16cf8966abff3f007ef06";
|
|
1092
|
+
record["historical_commit_attribution"] = "inferred_from_paper_runs_and_history";
|
|
1093
|
+
record["scene_sha256"] = scene == SceneAxis::PROCTHOR
|
|
1094
|
+
? nlohmann::json("76c463017f2a25683abaea3b29786294602bd2629b2f0725b7215dabf58f35aa") : nlohmann::json(nullptr);
|
|
1095
|
+
record["physics"] = options.workload == "render_only" ? nlohmann::json(nullptr) : nlohmann::json{
|
|
1096
|
+
{"model", "crazyflie"}, {"action_interface", "direct_motor"}, {"integrator", "rk4"},
|
|
1097
|
+
{"dt", 0.01}, {"substeps", 1}, {"reset_interval", 10}, {"action_amplitude", 0.01},
|
|
1098
|
+
{"camera_coupled", options.workload == "render_physics_coupled"}, {"collision_response", false}
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
const std::string line = record.dump();
|
|
1102
|
+
std::cout << line << '\n';
|
|
1103
|
+
if constexpr (CONFIG::PAPER) {
|
|
1104
|
+
std::ofstream results(options.output_jsonl, std::ios::app);
|
|
1105
|
+
results << line << '\n';
|
|
1106
|
+
results.close();
|
|
1107
|
+
if(!results) {
|
|
1108
|
+
std::cerr << "Cannot write benchmark results to '" << options.output_jsonl << "'" << std::endl;
|
|
1109
|
+
return false;
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
const std::string physics_suffix = CONFIG::PAPER && options.workload != "render_only"
|
|
1114
|
+
? std::string("/physics-") + PHYSICS_BACKEND_NAME : "";
|
|
1115
|
+
const std::string prefix = "raytracing/benchmark/render-v1/" + identity + physics_suffix + "/sync" + std::to_string(frame ? 1 : options.sync_interval);
|
|
1116
|
+
metra::log(prefix + "/elapsed_s", result.elapsed_s);
|
|
1117
|
+
metra::log(prefix + "/frames_per_s", result.frames_per_s);
|
|
1118
|
+
metra::log(prefix + "/pixels_per_s", result.pixels_per_s);
|
|
1119
|
+
metra::log(prefix + "/primary_mrays_per_s", result.primary_mrays_per_s);
|
|
1120
|
+
return true;
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
template <typename SPEC, typename DEVICE>
|
|
1124
|
+
static bool run_case(DEVICE& device, RUNTIME& runtime, SceneAxis scene, const Options& options) {
|
|
1125
|
+
rlt::rendering::Bundle<T> bundle;
|
|
1126
|
+
if(!setup_scene<SPEC>(device, bundle, scene, options)) {
|
|
1127
|
+
return false;
|
|
1128
|
+
}
|
|
1129
|
+
rlt::rendering::raytracing::Renderer<SPEC> renderer;
|
|
1130
|
+
malloc(device, renderer, runtime);
|
|
1131
|
+
init(device, renderer, bundle);
|
|
1132
|
+
const std::string device_label = device_name(device, renderer);
|
|
1133
|
+
rlt::log(device, device.logger, "Rendering ", scene_name(scene), " on ", BACKEND_NAME, " / ", device_label);
|
|
1134
|
+
|
|
1135
|
+
CameraPose pose{};
|
|
1136
|
+
BenchmarkResult result{};
|
|
1137
|
+
paper::PhysicsSimulation physics;
|
|
1138
|
+
CameraBuffer<SPEC> physics_cameras;
|
|
1139
|
+
if constexpr (CONFIG::MODE == BenchmarkMode::frame) {
|
|
1140
|
+
pose = make_single_frame_pose(bundle.metadata, options);
|
|
1141
|
+
write_single_camera(device, renderer, options.position, pose);
|
|
1142
|
+
synchronize(device, renderer);
|
|
1143
|
+
const auto start = std::chrono::steady_clock::now();
|
|
1144
|
+
render(device, renderer);
|
|
1145
|
+
synchronize(device, renderer);
|
|
1146
|
+
const double elapsed = std::chrono::duration<double>(std::chrono::steady_clock::now() - start).count();
|
|
1147
|
+
result = {1, elapsed, 1 / elapsed, SPEC::CAM_PIXELS / elapsed,
|
|
1148
|
+
SPEC::CAM_PIXELS * samples_per_pixel_for_spec<SPEC>() / (1e6 * elapsed)};
|
|
1149
|
+
}
|
|
1150
|
+
else {
|
|
1151
|
+
const auto poses = make_camera_poses<SPEC>(bundle.metadata, scene, options);
|
|
1152
|
+
write_cameras(device, renderer, scene, poses);
|
|
1153
|
+
if constexpr (CONFIG::PHYSICS_AVAILABLE) {
|
|
1154
|
+
if(options.workload != "render_only") {
|
|
1155
|
+
std::vector<paper::PhysicsCameraPose> physics_poses(poses.size());
|
|
1156
|
+
for(size_t i = 0; i < poses.size(); i++) {
|
|
1157
|
+
std::copy_n(poses[i].direction, 3, physics_poses[i].direction);
|
|
1158
|
+
std::copy_n(poses[i].up, 3, physics_poses[i].up);
|
|
1159
|
+
}
|
|
1160
|
+
const auto offset = camera_offset(scene);
|
|
1161
|
+
const T position[3] = {offset.x, offset.y, offset.z};
|
|
1162
|
+
if(!init_physics_simulation(device, physics, SPEC::NUM_CAMERAS, position, physics_poses.data(),
|
|
1163
|
+
FOV, static_cast<T>(SPEC::CAM_WIDTH) / SPEC::CAM_HEIGHT, options.seed)) {
|
|
1164
|
+
std::cerr << physics_last_error(device, physics) << std::endl;
|
|
1165
|
+
free(device, renderer);
|
|
1166
|
+
return false;
|
|
1167
|
+
}
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
if constexpr (CONFIG::PHYSICS_BACKEND == paper::PhysicsBackend::cpu) {
|
|
1171
|
+
if(options.workload == "render_physics_coupled") {
|
|
1172
|
+
malloc(device, physics_cameras);
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
try {
|
|
1176
|
+
result = run_benchmark(device, renderer, options, physics, physics_cameras);
|
|
1177
|
+
}
|
|
1178
|
+
catch(const std::runtime_error& error) {
|
|
1179
|
+
std::cerr << error.what() << std::endl;
|
|
1180
|
+
if constexpr (CONFIG::PHYSICS_AVAILABLE) {
|
|
1181
|
+
free_physics_simulation(device, physics);
|
|
1182
|
+
}
|
|
1183
|
+
if constexpr (CONFIG::PHYSICS_BACKEND == paper::PhysicsBackend::cpu) {
|
|
1184
|
+
if(options.workload == "render_physics_coupled") {
|
|
1185
|
+
free(device, physics_cameras);
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
free(device, renderer);
|
|
1189
|
+
return false;
|
|
1190
|
+
}
|
|
1191
|
+
if constexpr (CONFIG::PHYSICS_AVAILABLE) {
|
|
1192
|
+
free_physics_simulation(device, physics);
|
|
1193
|
+
}
|
|
1194
|
+
if constexpr (CONFIG::PHYSICS_BACKEND == paper::PhysicsBackend::cpu) {
|
|
1195
|
+
if(options.workload == "render_physics_coupled") {
|
|
1196
|
+
free(device, physics_cameras);
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
const auto* frame_pose = CONFIG::MODE == BenchmarkMode::frame ? &pose : nullptr;
|
|
1202
|
+
const std::string scene_id = scene == SceneAxis::PROCTHOR ? bundle.metadata.content_hash : OBJECTS20_LAYOUT_NAME;
|
|
1203
|
+
const std::string identity = case_name<SPEC>(scene, options, device_label, scene_id, frame_pose);
|
|
1204
|
+
const std::string image_name = identity + (CONFIG::PAPER ? "_repeat" + std::to_string(options.repeat) : "") + ".png";
|
|
1205
|
+
const std::string image = options.output_png.empty()
|
|
1206
|
+
? join_path(options.output_dir, image_name)
|
|
1207
|
+
: options.output_png;
|
|
1208
|
+
const auto parent = std::filesystem::path(image).parent_path();
|
|
1209
|
+
if(!parent.empty() && !ensure_output_dir(parent.string())) {
|
|
1210
|
+
free(device, renderer);
|
|
1211
|
+
return false;
|
|
1212
|
+
}
|
|
1213
|
+
save_verification_image(device, renderer, image);
|
|
1214
|
+
const bool reported = report<SPEC>(scene, options, device_label, result, image, scene_id, identity, frame_pose);
|
|
1215
|
+
free(device, renderer);
|
|
1216
|
+
return reported;
|
|
1217
|
+
}
|
|
1218
|
+
|
|
1219
|
+
template <typename SPEC, typename DEVICE>
|
|
1220
|
+
static bool run_scenes(DEVICE& device, RUNTIME& runtime, const std::vector<SceneAxis>& scenes, const Options& options) {
|
|
1221
|
+
for(SceneAxis scene : scenes) {
|
|
1222
|
+
if(options.workload == "all") {
|
|
1223
|
+
for(const char* workload : {"render_only", "render_physics_static"}) {
|
|
1224
|
+
auto selected = options;
|
|
1225
|
+
selected.workload = workload;
|
|
1226
|
+
if(!run_case<SPEC>(device, runtime, scene, selected)) {
|
|
1227
|
+
return false;
|
|
1228
|
+
}
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
if(!run_case<SPEC>(device, runtime, scene, options)) {
|
|
1233
|
+
return false;
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
}
|
|
1237
|
+
return true;
|
|
1238
|
+
}
|
|
1239
|
+
|
|
1240
|
+
template <typename SPEC, typename DEVICE>
|
|
1241
|
+
static bool run_sweep_spec(DEVICE& device, RUNTIME& runtime, const std::vector<SceneAxis>& scenes,
|
|
1242
|
+
const Options& options, bool& first, int& index) {
|
|
1243
|
+
const int current = index++;
|
|
1244
|
+
if(current < options.sweep_config_start || (options.sweep_config_count > 0
|
|
1245
|
+
&& current - options.sweep_config_start >= options.sweep_config_count)) {
|
|
1246
|
+
return true;
|
|
1247
|
+
}
|
|
1248
|
+
if(!first && options.cooldown_seconds > 0) {
|
|
1249
|
+
std::this_thread::sleep_for(std::chrono::duration<double>(options.cooldown_seconds));
|
|
1250
|
+
}
|
|
1251
|
+
first = false;
|
|
1252
|
+
rlt::log(device, device.logger, "Sweep configuration ", current);
|
|
1253
|
+
return run_scenes<SPEC>(device, runtime, scenes, options);
|
|
1254
|
+
}
|
|
1255
|
+
|
|
1256
|
+
template <TI RESOLUTION, bool AA, typename DEVICE>
|
|
1257
|
+
static bool run_sweep_resolution(DEVICE& device, RUNTIME& runtime, const std::vector<SceneAxis>& scenes,
|
|
1258
|
+
const std::vector<OutputAxis>& outputs, const Options& options, bool& first, int& index) {
|
|
1259
|
+
constexpr TI COUNT = SweepCameraCount<RESOLUTION>::VALUE;
|
|
1260
|
+
constexpr TI GRID = AA ? 2 : 1;
|
|
1261
|
+
for(OutputAxis output : outputs) {
|
|
1262
|
+
if(output == OutputAxis::RGB) {
|
|
1263
|
+
using MEDIUM = SweepBenchmarkSpec<true, false, RESOLUTION, RESOLUTION, COUNT, rlt::rendering::raytracing::Medium, AA, GRID>;
|
|
1264
|
+
using HIGH = SweepBenchmarkSpec<true, false, RESOLUTION, RESOLUTION, COUNT, rlt::rendering::raytracing::High, AA, GRID>;
|
|
1265
|
+
using LOW = SweepBenchmarkSpec<true, false, RESOLUTION, RESOLUTION, COUNT, rlt::rendering::raytracing::Low, AA, GRID>;
|
|
1266
|
+
if(!run_sweep_spec<MEDIUM>(device, runtime, scenes, options, first, index)
|
|
1267
|
+
|| !run_sweep_spec<HIGH>(device, runtime, scenes, options, first, index)
|
|
1268
|
+
|| !run_sweep_spec<LOW>(device, runtime, scenes, options, first, index)) {
|
|
1269
|
+
return false;
|
|
1270
|
+
}
|
|
1271
|
+
}
|
|
1272
|
+
else {
|
|
1273
|
+
using DEPTH = SweepBenchmarkSpec<false, true, RESOLUTION, RESOLUTION, COUNT, rlt::rendering::raytracing::Medium, AA, GRID>;
|
|
1274
|
+
if(!run_sweep_spec<DEPTH>(device, runtime, scenes, options, first, index)) {
|
|
1275
|
+
return false;
|
|
1276
|
+
}
|
|
1277
|
+
}
|
|
1278
|
+
}
|
|
1279
|
+
return true;
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
template <TI RESOLUTION = 64, typename DEVICE>
|
|
1283
|
+
static bool run_sweep(DEVICE& device, RUNTIME& runtime, const std::vector<SceneAxis>& scenes,
|
|
1284
|
+
const std::vector<OutputAxis>& outputs, const Options& options, bool& first, int& index) {
|
|
1285
|
+
if(!run_sweep_resolution<RESOLUTION, false>(device, runtime, scenes, outputs, options, first, index)
|
|
1286
|
+
|| !run_sweep_resolution<RESOLUTION, true>(device, runtime, scenes, outputs, options, first, index)) {
|
|
1287
|
+
return false;
|
|
1288
|
+
}
|
|
1289
|
+
if constexpr (RESOLUTION < 2048) {
|
|
1290
|
+
return run_sweep<RESOLUTION * 2>(device, runtime, scenes, outputs, options, first, index);
|
|
1291
|
+
}
|
|
1292
|
+
if(first) {
|
|
1293
|
+
std::cerr << "Sweep selection contains no configurations (available: " << index << ")." << std::endl;
|
|
1294
|
+
return false;
|
|
1295
|
+
}
|
|
1296
|
+
return true;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
template <typename SHADING, typename DEVICE>
|
|
1300
|
+
static bool run_profile(DEVICE& device, RUNTIME& runtime, const std::vector<SceneAxis>& scenes,
|
|
1301
|
+
const std::vector<OutputAxis>& outputs, const Options& options) {
|
|
1302
|
+
for(OutputAxis output : outputs) {
|
|
1303
|
+
if(output == OutputAxis::RGB) {
|
|
1304
|
+
if(!run_scenes<BenchmarkSpec<true, false, SHADING>>(device, runtime, scenes, options)) {
|
|
1305
|
+
return false;
|
|
1306
|
+
}
|
|
1307
|
+
}
|
|
1308
|
+
else {
|
|
1309
|
+
if(!run_scenes<BenchmarkSpec<false, true, SHADING>>(device, runtime, scenes, options)) {
|
|
1310
|
+
return false;
|
|
1311
|
+
}
|
|
1312
|
+
}
|
|
1313
|
+
}
|
|
1314
|
+
return true;
|
|
1315
|
+
}
|
|
1316
|
+
|
|
1317
|
+
template <typename CONFIG, typename DEVICE>
|
|
1318
|
+
static bool run(DEVICE& device, RUNTIME& runtime, const std::vector<SceneAxis>& scenes,
|
|
1319
|
+
const std::vector<OutputAxis>& outputs, const Options& options) {
|
|
1320
|
+
if constexpr (CONFIG::MODE == BenchmarkMode::sweep) {
|
|
1321
|
+
bool first = true;
|
|
1322
|
+
int index = 0;
|
|
1323
|
+
return run_sweep(device, runtime, scenes, outputs, options, first, index);
|
|
1324
|
+
}
|
|
1325
|
+
else if constexpr (CONFIG::PAPER) {
|
|
1326
|
+
if((options.fidelity == "low" || options.fidelity == "all")
|
|
1327
|
+
&& !run_profile<paper::PaperLow>(device, runtime, scenes, outputs, options)) {
|
|
1328
|
+
return false;
|
|
1329
|
+
}
|
|
1330
|
+
if((options.fidelity == "medium" || options.fidelity == "all")
|
|
1331
|
+
&& !run_profile<rlt::rendering::raytracing::Medium>(device, runtime, scenes, outputs, options)) {
|
|
1332
|
+
return false;
|
|
1333
|
+
}
|
|
1334
|
+
if((options.fidelity == "high" || options.fidelity == "all")
|
|
1335
|
+
&& !run_profile<paper::PaperHigh>(device, runtime, scenes, outputs, options)) {
|
|
1336
|
+
return false;
|
|
1337
|
+
}
|
|
1338
|
+
return true;
|
|
1339
|
+
}
|
|
1340
|
+
else {
|
|
1341
|
+
return run_profile<ShadingProfile>(device, runtime, scenes, outputs, options);
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
int rl_tools::rendering::raytracing::benchmark::benchmark_main(int argc, char** argv) {
|
|
1346
|
+
Options options;
|
|
1347
|
+
std::vector<SceneAxis> scenes;
|
|
1348
|
+
std::vector<OutputAxis> outputs;
|
|
1349
|
+
if(!parse_options(argc, argv, options) || !select_scenes(options.scene, scenes)
|
|
1350
|
+
|| !select_outputs(options.output, outputs) || !ensure_output_dir(options.output_dir)) {
|
|
1351
|
+
return 1;
|
|
1352
|
+
}
|
|
1353
|
+
if constexpr (CONFIG::PAPER) {
|
|
1354
|
+
const auto microseconds = std::chrono::duration_cast<std::chrono::microseconds>(
|
|
1355
|
+
std::chrono::system_clock::now().time_since_epoch()).count() % 1000000;
|
|
1356
|
+
std::ostringstream filename;
|
|
1357
|
+
filename << "rendering_raytracing_paper_benchmark_results_"
|
|
1358
|
+
<< rlt::utils::extrack::get_timestamp_string() << '_'
|
|
1359
|
+
<< std::setfill('0') << std::setw(6) << microseconds << ".jsonl";
|
|
1360
|
+
options.output_jsonl = join_path(options.output_dir, filename.str());
|
|
1361
|
+
std::ofstream results(options.output_jsonl, std::ios::app);
|
|
1362
|
+
if(!results) {
|
|
1363
|
+
std::cerr << "Cannot open benchmark results file '" << options.output_jsonl << "'" << std::endl;
|
|
1364
|
+
return 1;
|
|
1365
|
+
}
|
|
1366
|
+
std::cout << "Benchmark results: " << options.output_jsonl << std::endl;
|
|
1367
|
+
}
|
|
1368
|
+
DEVICE device;
|
|
1369
|
+
init(device);
|
|
1370
|
+
RUNTIME runtime;
|
|
1371
|
+
malloc(device, runtime);
|
|
1372
|
+
int exit_code = 0;
|
|
1373
|
+
for(int repeat = 0; repeat < options.repeats; repeat++) {
|
|
1374
|
+
options.repeat = repeat + 1;
|
|
1375
|
+
if(!run<CONFIG>(device, runtime, scenes, outputs, options)) {
|
|
1376
|
+
exit_code = 1;
|
|
1377
|
+
break;
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
free(device, runtime);
|
|
1381
|
+
return exit_code;
|
|
1382
|
+
}
|