new py-thop package (#35889)

* "new py-thop package"

* [@spackbot] updating style on behalf of Sangu-Mbekelu

* Update package.py

modified the url and dependencies

---------

Co-authored-by: Sangu Mbekelu <s.mbekelu9@gmail.com>
This commit is contained in:
Sangu Mbekelu 2023-03-08 10:12:27 -05:00 committed by GitHub
parent a2423f5736
commit 2777ca83eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -0,0 +1,22 @@
# 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"
version(
"0.1.1.post2209072238",
sha256="01473c225231927d2ad718351f78ebf7cffe6af3bed464c4f1ba1ef0f7cdda27",
expand=False,
)
depends_on("py-torch", type=("build", "run"))