awesome-repositories.com
Blog
MCP
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectMCP serverAboutHow we rankPress
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
Lyken17 avatar

Lyken17/pytorch-OpCounter

0
View on GitHub↗
5,080 stars·535 forks·Python·MIT·16 views

Pytorch OpCounter

pytorch-OpCounter is a profiling utility for PyTorch neural networks designed to quantify model efficiency by calculating floating point operations and multiply-accumulate counts. It functions as a complexity analyzer to measure the computational cost and theoretical workload of different model architectures.

The tool allows for the definition of custom operation counting rules to support third-party modules not covered by default. It uses forward hooks to intercept module calls and recursive traversal of the module tree to aggregate operations across child sub-modules.

The project provides capabilities for performance auditing and complexity analysis, transforming raw operation counts into human-readable scaled metric formats.

Features

  • Model Complexity Analysis - Quantifies the theoretical workload of a model to estimate its efficiency and resource requirements before deployment.
  • Model Complexity Calculators - Calculates multiply-accumulate and floating point operations to quantify neural network computational cost.
  • Deep Learning Optimization - Evaluates the operational overhead of different model architectures to optimize for speed and hardware constraints.
  • Computational Cost Profilers - Measures the computational cost of PyTorch neural networks by calculating floating point operations and multiply-accumulate counts.
  • FLOPs Counters - Measures floating point operations to evaluate the efficiency and performance of PyTorch model architectures.
  • MACs and FLOPs Analyzers - Calculates the number of MACs and FLOPs to quantify the computational cost of PyTorch neural networks.
  • Recursive Module Operations - Walks through the hierarchical structure of a neural network to aggregate total operations across all child sub-modules.
  • Model Execution Hooks - Intercepts PyTorch module calls using forward hooks to record and accumulate operation counts during a single pass.
  • Operation Count Profilers - Provides a profiling tool for counting multiply-accumulate operations and defining custom counting rules for PyTorch modules.
  • Custom Operation Counting Rules - Defining specific operation counting logic for specialized PyTorch modules not supported by default profiling tools.
  • Operational State Accumulators - Implements a global state to sum multiply-accumulate and floating point operations across disparate layers of the model.
  • Complexity Counting Rules - Provides a mechanism to specify how to count operations for third-party modules not supported by default.
  • Computational Complexity Mappings - Maps specific module types or function names to predefined mathematical formulas for calculating computational complexity.
  • Developer Tools - FLOPs counting utility.
  • More to explore - Tool for counting MACs and FLOPs.
  • PyTorch Utilities - Listed in the “PyTorch Utilities” section of the The Incredible Pytorch awesome list.

Star history

Star history chart for lyken17/pytorch-opcounterStar history chart for lyken17/pytorch-opcounter

How this analysis was created: This summary and feature list are AI-generated from collected project material and can contain mistakes. Stars, license and language are imported from GitHub. Inclusion does not mean that we have tested or audited this project. Check the source documentation for any feature you depend on. Learn more on our About page.

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Frequently asked questions

What does lyken17/pytorch-opcounter do?

pytorch-OpCounter is a profiling utility for PyTorch neural networks designed to quantify model efficiency by calculating floating point operations and multiply-accumulate counts. It functions as a complexity analyzer to measure the computational cost and theoretical workload of different model architectures.

What are the main features of lyken17/pytorch-opcounter?

The main features of lyken17/pytorch-opcounter are: Model Complexity Analysis, Model Complexity Calculators, Deep Learning Optimization, Computational Cost Profilers, FLOPs Counters, MACs and FLOPs Analyzers, Recursive Module Operations, Model Execution Hooks.

Which projects share features with lyken17/pytorch-opcounter?

Projects with overlapping indexed features include: tingsongyu/pytorch_tutorial — This project is a comprehensive collection of educational examples and reference implementations for building vision… mariogeiger/hessian — hessian in pytorch. ag14774/diffdist. kevinmusgrave/pytorch-metric-learning — PyTorch Metric Learning is an open-source library for training neural networks to produce similarity-preserving… tingsongyu/pytorch-tutorial-2nd — This project is a comprehensive instructional resource and course for building neural networks using PyTorch. It… nvidia-ai-iot/torch2trt — torch2trt is a tool for transforming PyTorch model modules into optimized TensorRT engines to improve inference…

Projects sharing features with Pytorch OpCounter

These projects share indexed features with Pytorch OpCounter. Shared tags can include platform or build tooling; verify the primary use case before treating a result as a replacement.
  • tingsongyu/pytorch_tutorialTingsongYu avatar

    TingsongYu/PyTorch_Tutorial

    8,018View on GitHub↗

    This project is a comprehensive collection of educational examples and reference implementations for building vision and language models using PyTorch. It serves as a deep learning tutorial covering the end-to-end process of developing neural networks, from initial architecture definition to final production deployment. The repository provides detailed guides on implementing a wide range of domain-specific models, including convolutional neural networks for object detection and segmentation, as well as transformer and recurrent architectures for natural language processing. It emphasizes gene

    Python
    View on GitHub↗8,018
  • ag14774/diffdistag14774 avatar

    ag14774/diffdist

    62View on GitHub↗
    Python
    View on GitHub↗62
  • kevinmusgrave/pytorch-metric-learningKevinMusgrave avatar

    KevinMusgrave/pytorch-metric-learning

    6,328View on GitHub↗

    PyTorch Metric Learning is an open-source library for training neural networks to produce similarity-preserving embedding spaces. It provides a modular framework where interchangeable loss functions, mining strategies, and evaluation tools can be composed to learn representations that map similar items to nearby points and dissimilar items to distant points in the embedding space. The library distinguishes itself through a highly configurable architecture that separates concerns across several interchangeable components. Users can assemble custom loss functions from pluggable distance metrics

    Pythoncomputer-visioncontrastive-learningdeep-learning
    View on GitHub↗6,328
  • mariogeiger/hessianmariogeiger avatar

    mariogeiger/hessian

    187View on GitHub↗

    hessian in pytorch

    Python
    View on GitHub↗187
Compare all 30 related projects→