summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/py-thop/package.py
blob: 59551384eddb7ce59813ba08e9f0510936d6e899 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright 2013-2023 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


from spack.package import *


class PyThop(PythonPackage):
    """A tool to count the FLOPs of PyTorch model."""

    homepage = "https://github.com/Lyken17/pytorch-OpCounter/"
    url = "https://pypi.io/packages/py3/t/thop/thop-0.1.1.post2209072238-py3-none-any.whl"

    license("MIT")

    version(
        "0.1.1.post2209072238",
        sha256="01473c225231927d2ad718351f78ebf7cffe6af3bed464c4f1ba1ef0f7cdda27",
        expand=False,
    )

    depends_on("py-torch", type=("build", "run"))