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:
co-authored by
Claude Sonnet 4.6
parent
57e5252caa
commit
228137555f
@@ -177,18 +177,18 @@ impl Backend for RocmBackend {
|
||||
}
|
||||
|
||||
fn sin<const D: usize>(tensor: Self::TensorPrimitive<D>) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("sin not yet implemented for ROCm backend")
|
||||
ops::unary::sin(&tensor)
|
||||
}
|
||||
|
||||
fn cos<const D: usize>(tensor: Self::TensorPrimitive<D>) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("cos not yet implemented for ROCm backend")
|
||||
ops::unary::cos(&tensor)
|
||||
}
|
||||
|
||||
fn pow<const D: usize>(
|
||||
tensor: Self::TensorPrimitive<D>,
|
||||
exp: Self::FloatElem,
|
||||
) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("pow not yet implemented for ROCm backend")
|
||||
ops::unary::pow(&tensor, exp)
|
||||
}
|
||||
|
||||
fn clamp<const D: usize>(
|
||||
@@ -196,21 +196,21 @@ impl Backend for RocmBackend {
|
||||
min: Self::FloatElem,
|
||||
max: Self::FloatElem,
|
||||
) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("clamp not yet implemented for ROCm backend")
|
||||
ops::comparison::clamp(&tensor, Some(min), Some(max))
|
||||
}
|
||||
|
||||
// ==================== Activation Functions ====================
|
||||
|
||||
fn relu<const D: usize>(tensor: Self::TensorPrimitive<D>) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("relu not yet implemented for ROCm backend")
|
||||
ops::activation::relu(&tensor)
|
||||
}
|
||||
|
||||
fn sigmoid<const D: usize>(tensor: Self::TensorPrimitive<D>) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("sigmoid not yet implemented for ROCm backend")
|
||||
ops::activation::sigmoid(&tensor)
|
||||
}
|
||||
|
||||
fn tanh<const D: usize>(tensor: Self::TensorPrimitive<D>) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("tanh not yet implemented for ROCm backend")
|
||||
ops::activation::tanh(&tensor)
|
||||
}
|
||||
|
||||
// ==================== Reduction Operations ====================
|
||||
@@ -238,14 +238,14 @@ impl Backend for RocmBackend {
|
||||
}
|
||||
|
||||
fn var<const D: usize>(tensor: Self::TensorPrimitive<D>) -> Self::TensorPrimitive<1> {
|
||||
unimplemented!("var not yet implemented for ROCm backend")
|
||||
ops::reduction::var(&tensor)
|
||||
}
|
||||
|
||||
fn var_dim<const D: usize>(
|
||||
tensor: Self::TensorPrimitive<D>,
|
||||
dim: usize,
|
||||
) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("var_dim not yet implemented for ROCm backend")
|
||||
ops::reduction::var_dim(&tensor, dim)
|
||||
}
|
||||
|
||||
fn max<const D: usize>(tensor: Self::TensorPrimitive<D>) -> Self::TensorPrimitive<1> {
|
||||
@@ -338,14 +338,14 @@ impl Backend for RocmBackend {
|
||||
tensor: Self::TensorPrimitive<D>,
|
||||
negative_slope: Self::FloatElem,
|
||||
) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("leaky_relu not yet implemented for ROCm backend")
|
||||
ops::activation::leaky_relu(&tensor, negative_slope)
|
||||
}
|
||||
|
||||
fn elu<const D: usize>(
|
||||
tensor: Self::TensorPrimitive<D>,
|
||||
alpha: Self::FloatElem,
|
||||
) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("elu not yet implemented for ROCm backend")
|
||||
ops::activation::elu(&tensor, alpha)
|
||||
}
|
||||
|
||||
// ==================== Comparison Operations ====================
|
||||
@@ -354,7 +354,7 @@ impl Backend for RocmBackend {
|
||||
tensor: Self::TensorPrimitive<D>,
|
||||
value: Self::FloatElem,
|
||||
) -> Self::TensorPrimitive<D> {
|
||||
unimplemented!("gt_scalar not yet implemented for ROCm backend")
|
||||
ops::comparison::gt_scalar(&tensor, value)
|
||||
}
|
||||
|
||||
// ==================== Convolution Operations ====================
|
||||
@@ -368,7 +368,14 @@ impl Backend for RocmBackend {
|
||||
dilation: [usize; 2],
|
||||
groups: usize,
|
||||
) -> Self::TensorPrimitive<4> {
|
||||
unimplemented!("conv2d not yet implemented for ROCm backend")
|
||||
let config = ops::convolution::Conv2dConfig {
|
||||
kernel_size: (weight.shape[2], weight.shape[3]),
|
||||
stride: (stride[0], stride[1]),
|
||||
padding: (padding[0], padding[1]),
|
||||
dilation: (dilation[0], dilation[1]),
|
||||
groups,
|
||||
};
|
||||
ops::convolution::conv2d(&input, weight, bias, &config)
|
||||
}
|
||||
|
||||
// ==================== Pooling Operations ====================
|
||||
@@ -379,7 +386,14 @@ impl Backend for RocmBackend {
|
||||
stride: [usize; 2],
|
||||
padding: [usize; 2],
|
||||
) -> Self::TensorPrimitive<4> {
|
||||
unimplemented!("max_pool2d not yet implemented for ROCm backend")
|
||||
let config = ops::pooling::Pool2dConfig {
|
||||
kernel_size: (kernel_size[0], kernel_size[1]),
|
||||
stride: (stride[0], stride[1]),
|
||||
padding: (padding[0], padding[1]),
|
||||
dilation: (1, 1),
|
||||
ceil_mode: false,
|
||||
};
|
||||
ops::pooling::max_pool2d(&input, &config)
|
||||
}
|
||||
|
||||
fn avg_pool2d(
|
||||
@@ -389,7 +403,14 @@ impl Backend for RocmBackend {
|
||||
padding: [usize; 2],
|
||||
count_include_pad: bool,
|
||||
) -> Self::TensorPrimitive<4> {
|
||||
unimplemented!("avg_pool2d not yet implemented for ROCm backend")
|
||||
let config = ops::pooling::Pool2dConfig {
|
||||
kernel_size: (kernel_size[0], kernel_size[1]),
|
||||
stride: (stride[0], stride[1]),
|
||||
padding: (padding[0], padding[1]),
|
||||
dilation: (1, 1),
|
||||
ceil_mode: false,
|
||||
};
|
||||
ops::pooling::avg_pool2d(&input, &config, count_include_pad)
|
||||
}
|
||||
|
||||
// ==================== Device Management ====================
|
||||
|
||||
Reference in New Issue
Block a user