fix(gaps): G0/G2/G5/G8 — eliminate unimplemented! panics, re-enable rtx-distributed, rtx-tts, fix multimodal forward

G0 (Critical): Replace 45 unimplemented!() panics across three GPU backends
- rtx-backend-cuda: sin/cos/tanh via PTX, relu/sigmoid/leaky_relu/elu via activation.rs,
  pow/clamp/gt_scalar via unary.rs, var/var_dim host-side, conv2d/max_pool2d/avg_pool2d
  CPU fallback in new ops/conv.rs; new PTX kernels in element_wise.cu
- rtx-backend-rocm: all 15 ops via CPU round-trip (to_vec → compute → from_slice)
- rtx-backend-sycl: all 15 ops via CPU round-trip (to_host → compute → from_data)

G2 (High): Re-add rtx-distributed to workspace
- Vendor 4 minimal RNCCL stub crates at crates/vendor/rnccl/*
- Update rtx-distributed RNCCL path deps to point at stubs (../../../../RNCCL/* → ../../vendor/rnccl/*)
- Remove rtx-distributed from workspace exclude list, add to members

G5 (Medium): Re-enable rtx-tts (213 tests restored)
- Fix 15 rtx-nn API drift issues: LayerNorm::new, Conv1d::from_config, Conv1dPadding::Zeros,
  Dropout::new(p, device), tensor methods (relu/tanh/sigmoid/cat/stack), squeeze(Some(n)),
  to_vec() turbofish removal, Tensor::randn with &[...] slices

G8 (Low): Quantum stubs + multimodal forward bug
- rtx-timeseries: remove dead quantum/neuromorphic TODO comment blocks (no module files exist)
- rtx-multimodal/fusion/transformer.rs: wire TransformerBlock loop in forward()
- rtx-multimodal/fusion/strategies.rs: wire bottleneck_layers loop in forward()
- rtx-transformers/architectures/transformer_block.rs: add forward() method (pre-norm residuals;
  full attention+FFN pending when those sub-layers are wired)

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
Omar Sobh
2026-06-26 13:40:23 +00:00
co-authored by Claude Sonnet 4.6
parent 57e5252caa
commit 228137555f
37 changed files with 1509 additions and 215 deletions
@@ -115,7 +115,7 @@ impl GriffinLim {
}
// Initialize with random phase
let phase = Tensor::rand([n_freqs, n_frames], &self.device)
let phase = Tensor::randn(&[n_freqs, n_frames], &self.device)
.map_err(|e| TtsError::TensorError(e.to_string()))?;
// Convert to radians (0 to 2π)
@@ -357,7 +357,7 @@ mod tests {
// Create a dummy mel spectrogram
let n_frames = 50;
let mel_spec = Tensor::randn([config.mel_config.n_mels, n_frames], &device).unwrap();
let mel_spec = Tensor::randn(&[config.mel_config.n_mels, n_frames], &device).unwrap();
// Convert to linear
let linear_spec = gl.mel_to_linear(&mel_spec).unwrap();
@@ -390,7 +390,7 @@ mod tests {
// Create a magnitude spectrogram
let n_freqs = config.n_fft / 2 + 1;
let n_frames = 50;
let magnitude = Tensor::rand([n_freqs, n_frames], &device).unwrap();
let magnitude = Tensor::randn(&[n_freqs, n_frames], &device).unwrap();
// Reconstruct phase
let audio = gl.reconstruct_phase(&magnitude).unwrap();
@@ -413,7 +413,7 @@ mod tests {
let gl = GriffinLim::new(config, &device).unwrap();
// Create 1D tensor (invalid)
let magnitude = Tensor::rand([100], &device).unwrap();
let magnitude = Tensor::randn(&[100], &device).unwrap();
let result = gl.reconstruct_phase(&magnitude);
assert!(result.is_err());
}
@@ -432,7 +432,7 @@ mod tests {
let gl = GriffinLim::new(config, &device).unwrap();
// Create magnitude with wrong number of frequency bins
let magnitude = Tensor::rand([100, 50], &device).unwrap();
let magnitude = Tensor::randn(&[100, 50], &device).unwrap();
let result = gl.reconstruct_phase(&magnitude);
assert!(result.is_err());
}
@@ -460,7 +460,7 @@ mod tests {
// Create a dummy mel spectrogram
let n_frames = 50;
let mel_spec = Tensor::rand([config.mel_config.n_mels, n_frames], &device).unwrap();
let mel_spec = Tensor::randn(&[config.mel_config.n_mels, n_frames], &device).unwrap();
// Synthesize audio
let audio = gl.synthesize(&mel_spec).unwrap();
@@ -476,7 +476,7 @@ mod tests {
let gl = GriffinLim::new(config, &device).unwrap();
// Create invalid mel spectrogram (wrong number of mels)
let mel_spec = Tensor::rand([40, 50], &device).unwrap();
let mel_spec = Tensor::randn(&[40, 50], &device).unwrap();
let result = gl.synthesize(&mel_spec);
assert!(result.is_err());
}
@@ -505,7 +505,7 @@ mod tests {
// Test Vocoder trait methods
assert_eq!(gl.get_sample_rate(), 16000);
let mel_spec = Tensor::rand([40, 50], &device).unwrap();
let mel_spec = Tensor::randn(&[40, 50], &device).unwrap();
let audio = gl.synthesize(&mel_spec).unwrap();
assert!(audio.dims()[0] > 0);
}
@@ -532,7 +532,7 @@ mod tests {
},
};
let mel_spec = Tensor::rand([40, 30], &device).unwrap();
let mel_spec = Tensor::randn(&[40, 30], &device).unwrap();
for n_iter in iterations {
let mut config = base_config.clone();