diff options
author | Michael Jones <michael_p_jones@apple.com> | 2022-10-24 12:23:56 +0300 |
---|---|---|
committer | Michael Jones <michael_p_jones@apple.com> | 2022-10-24 19:14:33 +0300 |
commit | 8dd7b5b26b394207b5941d49750f7e3abadaf82a (patch) | |
tree | fe7425665e435667fc8977cce3b32919dffd9f67 /intern/cycles/device/hip/queue.cpp | |
parent | 4c6e07230f76c21e67f0d5ef15464ca7d55c404a (diff) |
Cycles: Metal integrator state size tuning
This patch tunes the integrator state sizing for Metal (`num_concurrent_states` and `num_concurrent_busy_states`).
On all GPUs architecture, we adjust the busy:total states ratio to be 1:4 which gives better rendering performance than the previous 1:16 ratio (independent of total state count). This gives a small performance uplift (e.g. 2-3% on M1 Ultra).
Additionally for M2 architectures, we double the overall state size if there is available headroom. Inclusive of the first change, we can expect uplift of close to 10% in future, as this results in larger dispatch sizes and minimises work submission overheads. In order to make an accurate determination of available headroom, we defer the calculation of `num_concurrent_states` and `num_concurrent_busy_states` until the time of integrator state allocation (i.e. after all of the scene data has been allocated). We also refactor `alloc_integrator_soa` to calculate an *exact* single-state-size in a first pass, right before allocating the integrator SoA buffers in a second pass.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D16313
Diffstat (limited to 'intern/cycles/device/hip/queue.cpp')
-rw-r--r-- | intern/cycles/device/hip/queue.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/intern/cycles/device/hip/queue.cpp b/intern/cycles/device/hip/queue.cpp index 3f8b6267100..e93a9b4df3a 100644 --- a/intern/cycles/device/hip/queue.cpp +++ b/intern/cycles/device/hip/queue.cpp @@ -49,7 +49,7 @@ int HIPDeviceQueue::num_concurrent_states(const size_t state_size) const return num_states; } -int HIPDeviceQueue::num_concurrent_busy_states() const +int HIPDeviceQueue::num_concurrent_busy_states(const size_t /*state_size*/) const { const int max_num_threads = hip_device_->get_num_multiprocessors() * hip_device_->get_max_num_threads_per_multiprocessor(); |