heap_trimmed's kernel takes 320,000 steps with 64 values live
The test's kernel of 150,000 fused multiply-adds with 600 values live did not finish its making within the test's wait on an RTX 3090 (NVIDIA 620.70.06), alone on its node (m3-max-30563: TimedOut at the first dispatch, the making still in the driver past 117 s). The 5080's 615 driver had made it in 13 s. A probe on the 3090 (m3-max-30699, one process making one size after another) showed the compile time growing faster than the steps with 600 live (40,000: 8.3 s; 80,000: 27.5 s), and the free heap a making leaves growing about 1.25 KB a step with 64 live, at about 30 us a step (80,000 steps: 2.4 s). The trim needs more than FREE_FLOOR (256 MiB) free after a large making. 320,000 steps with 64 live frees about 400 MB by that slope, at about 10 s. The test's claim and its assertions are unchanged. The module docs give the measurement behind the size. Verified: cargo fmt. The proof is the test itself, in a fresh process on the 3090 and um870's 780M, in one exclusive job.
This commit is contained in:
1 parent
ff68ba6764
commit
5fba5455a5
1 file changed
+17
-10
@@ -1,13 +1,20 @@
|
||||
//! The free heap a large making's compile leaves is handed back (`pipeline/compile_memory.rs`): a
|
||||
//! kernel of [`STEPS`] fused multiply-adds with [`WINDOW`] values live at once, past the registers,
|
||||
//! made as two `VkPipeline`s of its partial-threadgroups variant, which runs a large kernel's whole
|
||||
//! and ragged grids alike (`compute::partial_direct`), one per threadgroup size, each a large
|
||||
//! making. glibc keeps what the driver's compile frees in
|
||||
//! the compiling thread's arena; handed back after each, the process's resident set stays within
|
||||
//! [`BOUND_MIB`] of what it was before the first, and the device counts the trims.
|
||||
//! kernel of [`STEPS`] fused multiply-adds with [`WINDOW`] values live at once, made as two
|
||||
//! `VkPipeline`s of its partial-threadgroups variant, which runs a large kernel's whole and ragged
|
||||
//! grids alike (`compute::partial_direct`), one per threadgroup size, each a large making. glibc
|
||||
//! keeps what the driver's compile frees in the compiling thread's arena; handed back after each,
|
||||
//! the process's resident set stays within [`BOUND_MIB`] of what it was before the first, and the
|
||||
//! device counts the trims.
|
||||
//!
|
||||
//! Measured on an RX 7900 XTX (RADV, Mesa 26.2.6) with 200,000 steps and nothing handed back: 105
|
||||
//! MiB before, 3.8 GiB after the first making, 7.3 GiB after the third (one run).
|
||||
//! Measured on an RX 7900 XTX (RADV, Mesa 26.2.6) with 200,000 steps, 600 live, and nothing handed
|
||||
//! back: 105 MiB before, 3.8 GiB after the first making, 7.3 GiB after the third (one run).
|
||||
//!
|
||||
//! The size: the compile must free more than the trim's floor (`compile_memory::FREE_FLOOR`,
|
||||
//! 256 MiB) within the test's wait on every device. On an RTX 3090 (NVIDIA 620.70.06), one process
|
||||
//! making one size after another, the free heap grew about 1.25 KB a step with 64 values live, at
|
||||
//! about 30 us a step (80,000 steps: 2.4 s), and the compile time grew faster than the steps with
|
||||
//! 600 live (40,000 steps: 8.3 s; 80,000: 27.5 s; 150,000: past 117 s, past the wait), freeing about
|
||||
//! 2 KB a step. So 64 live, and steps for about 400 MB.
|
||||
//!
|
||||
//! A device test of glibc's allocator: compiled only under `m2v_gpu` on Linux with the GNU
|
||||
//! environment. The module is LLVM text written here (`llvm-as`).
|
||||
@@ -21,10 +28,10 @@ use metal2vulkan::pipeline::{ComputePipelineDescriptor, StageSource};
|
||||
use std::fmt::Write;
|
||||
|
||||
/// The kernel's fused multiply-adds.
|
||||
const STEPS: usize = 150_000;
|
||||
const STEPS: usize = 320_000;
|
||||
|
||||
/// The values each step's operand is behind: so many live at once.
|
||||
const WINDOW: usize = 600;
|
||||
const WINDOW: usize = 64;
|
||||
|
||||
/// The most the resident set may grow over the makings, in MiB.
|
||||
const BOUND_MIB: u64 = 1024;
|
||||
|
||||
Reference in new issue
Block a user