@@ -8,7 +8,7 @@ use rustc_hash::FxHashMap;
88/// Usage:
99/// cargo run --release --no-default-features -p yscv-llm-bench --bin nchwc_coverage \
1010/// -- private/private/model.onnx
11- use std :: collections :: HashSet ;
11+ use rustc_hash :: FxHashSet ;
1212use yscv_onnx:: { OnnxAttribute , OnnxModel , OnnxNode , load_onnx_model_from_file} ;
1313
1414fn main ( ) {
@@ -421,8 +421,8 @@ fn run_coverage_probe(model: &OnnxModel) {
421421 // And number of exit converters (nchwc tensors consumed by non-nchwc non-Conv nodes)
422422
423423 // Use effective_weights keys as the "static" set (includes Identity-aliased weights)
424- let static_names: HashSet < & str > = effective_weights. keys ( ) . map ( |s| s. as_str ( ) ) . collect ( ) ;
425- let initializer_names: HashSet < & str > = static_names. clone ( ) ;
424+ let static_names: FxHashSet < & str > = effective_weights. keys ( ) . map ( |s| s. as_str ( ) ) . collect ( ) ;
425+ let initializer_names: FxHashSet < & str > = static_names. clone ( ) ;
426426 let dynamic_inputs: Vec < & str > = model
427427 . inputs
428428 . iter ( )
@@ -437,7 +437,7 @@ fn run_coverage_probe(model: &OnnxModel) {
437437 }
438438
439439 // Mark which tensors are in nchwc domain (after potential converter)
440- let mut nchwc_tensors: HashSet < String > = HashSet :: new ( ) ;
440+ let mut nchwc_tensors: FxHashSet < String > = FxHashSet :: default ( ) ;
441441 // Graph inputs start as NHWC; we will count converters needed for them
442442 // if any eligible node consumes them directly.
443443
@@ -446,7 +446,7 @@ fn run_coverage_probe(model: &OnnxModel) {
446446 let mut internal_boundaries = 0usize ;
447447
448448 // Track which dynamic inputs get a converter
449- let mut converted_inputs: HashSet < String > = HashSet :: new ( ) ;
449+ let mut converted_inputs: FxHashSet < String > = FxHashSet :: default ( ) ;
450450
451451 for ( i, node) in model. nodes . iter ( ) . enumerate ( ) {
452452 if !node_eligible[ i] && !matches ! ( node. op_type. as_str( ) , "Conv" | "Conv_Relu" | "Conv_SiLU" )
0 commit comments