Why are Some ONNX Model Layers Ignored by Profiler ? #77
-
I've been using the profiling tool from the repository and observed that it seems to ignore certain layers of ONNX models during profiling. The following opType are being ignored:
I understand that every layer consumes memory when loaded into a system, so I'm curious about the reason behind this behavior. # Code snippet to run profiler
# Download model from ONNX zoo
wget https://media.githubusercontent.com/media/onnx/models/main/Natural_Language_Processing/roberta_Opset18_transformers/roberta_Opset18.onnx
# Run profiler from CLI
python -m onnx_tool -m profile -i 'roberta_Opset18.onnx' -f outputFromProfile.profilerOutput
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
To print all layers 's profile details1 Clone repo git clone https://github.com/ThanatosShinji/onnx-tool.git 2 Make changes in the init.py. # These ops have no computation
# NoMacsOps = (
# 'Identity', 'Constant', 'Shape', 'Squeeze', 'Unsqueeze', 'Reshape', 'ConstantOfShape', 'Cast', 'Pad', 'Concat',
# 'Slice', 'Gather'
# )
#--------------------------------Change to empty
NoMacsOps = () 3 Install pip install <local_dir>/onnx-tool/ |
Beta Was this translation helpful? Give feedback.
To print all layers 's profile details
1 Clone repo
2 Make changes in the init.py.
3 Install