style: cargo fmt --workspace (whitespace/wrapping only, no semantic change)
Whole-workspace rustfmt pass picked up while iterating on Mamba GPU backward work. Verified formatting-only via diff sampling; no logic changed. Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
@@ -158,8 +158,12 @@ fn generate_constant(node: &Node, graph: &OnnxGraph) -> Result<TokenStream> {
|
||||
let #output_ident = self.#output_ident.clone();
|
||||
})
|
||||
} else if let (Some(AttributeValue::Floats(data)), Some(AttributeValue::Ints(dims))) = (
|
||||
node.attributes.get("value_float").or_else(|| node.attributes.get("floats")),
|
||||
node.attributes.get("dims").or_else(|| node.attributes.get("value_dims")),
|
||||
node.attributes
|
||||
.get("value_float")
|
||||
.or_else(|| node.attributes.get("floats")),
|
||||
node.attributes
|
||||
.get("dims")
|
||||
.or_else(|| node.attributes.get("value_dims")),
|
||||
) {
|
||||
// Inline constant: float data + explicit shape
|
||||
let shape: Vec<usize> = dims.iter().map(|&d| d as usize).collect();
|
||||
@@ -178,7 +182,10 @@ fn generate_constant(node: &Node, graph: &OnnxGraph) -> Result<TokenStream> {
|
||||
})
|
||||
} else {
|
||||
// No recognizable constant value — emit a compile-time error in the generated code
|
||||
let msg = format!("Constant node '{}' has no resolvable value attribute", node.name);
|
||||
let msg = format!(
|
||||
"Constant node '{}' has no resolvable value attribute",
|
||||
node.name
|
||||
);
|
||||
Ok(quote! {
|
||||
compile_error!(#msg);
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user