DeduplicateHashedInitializersPass¶
- class onnx_ir.passes.common.DeduplicateHashedInitializersPass(size_limit=4294967296)[source]¶
Remove duplicated initializer tensors (using a hashed method) from the graph.
This pass detects initializers with identical shape, dtype, and hashed content, and replaces all duplicate references with a canonical one.
This pass should have a lower peak memory usage than
DeduplicateInitializersPassas it does not store the full tensor data in memory, but instead uses a hash of the tensor data.Added in version 0.1.7.
- Parameters:
size_limit (int)