fix: clippy ScalarValue::as_f32→to_f32_scalar + CI infra fixes
- ScalarValue trait: as_f32() → to_f32_scalar() (clippy wrong_self_convention) - CI template: test-gate uses ci-builder (CUDA) instead of ci-builder-cpu - VPC: enabled DefaultRoutePropagation for gateway DHCP - PVCs: all set to Retain reclaim policy - Argo CLI: configured server mode for archived log retrieval Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -34,19 +34,19 @@ fn raw_ptr_mut(slice: &mut CudaSlice<f32>, stream: &CudaStream) -> u64 {
|
||||
|
||||
/// Helper trait for scalar values that can be converted to f32.
|
||||
pub trait ScalarValue {
|
||||
fn as_f32(self) -> f32;
|
||||
fn to_f32_scalar(self) -> f32;
|
||||
}
|
||||
|
||||
impl ScalarValue for f32 {
|
||||
fn as_f32(self) -> f32 { self }
|
||||
fn to_f32_scalar(self) -> f32 { self }
|
||||
}
|
||||
|
||||
impl ScalarValue for f64 {
|
||||
fn as_f32(self) -> f32 { self as f32 }
|
||||
fn to_f32_scalar(self) -> f32 { self as f32 }
|
||||
}
|
||||
|
||||
impl ScalarValue for &[f32] {
|
||||
fn as_f32(self) -> f32 { self.first().copied().unwrap_or(0.0) }
|
||||
fn to_f32_scalar(self) -> f32 { self.first().copied().unwrap_or(0.0) }
|
||||
}
|
||||
|
||||
/// A GPU-resident f32 tensor with shape information.
|
||||
|
||||
Reference in New Issue
Block a user