Overview of calflops capabilities
maincalflops is a tool designed to compute theoretical FLOPs (floating-point operations), MACs (multiply-add operations), and Parameters for various neural network architectures.
Supported Architectures:
- Linear layers
- CNN (Convolutional Neural Networks)
- RNN (Recurrent Neural Networks)
- GCN (Graph Convolutional Networks)
- Transformers (including BERT, LLaMA, and other Large Language Models)
- Custom models: Any model based on a PyTorch implementation using
torch.nn.function.*is supported.
Key Features:
- Provides submodule-level granularity: It can print the FLOPs, Parameter count, and the proportion of total consumption for each submodule, helping users identify performance bottlenecks.