Skip to content

Commit

Permalink
python312Packages.torchprofile: init at 0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol committed Nov 1, 2024
1 parent 157d7e2 commit 37e72af
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
47 changes: 47 additions & 0 deletions pkgs/development/python-modules/torchprofile/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
setuptools,
numpy,
torch,
torchvision,
}:

buildPythonPackage rec {
pname = "torchprofile";
version = "0.0.3";
pyproject = true;

src = fetchFromGitHub {
owner = "zhijian-liu";
repo = "torchprofile";
rev = "v${version}";
hash = "sha256-6vxZHQwBjKpy288wcANdJ9gmvIOZloLv+iN76TtqYAI=";
};

build-system = [
setuptools
];

pythonRelaxDeps = [
"torchvision"
];

dependencies = [
numpy
torch
torchvision
];

pythonImportsCheck = [
"torchprofile"
];

meta = {
description = "A general and accurate MACs / FLOPs profiler for PyTorch models";
homepage = "https://github.com/zhijian-liu/torchprofile";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ drupol ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15921,6 +15921,8 @@ self: super: with self; {
# Used by streamlit, 2021-01-29
tornado_5 = callPackage ../development/python-modules/tornado/5.nix { };

torchprofile = callPackage ../development/python-modules/torchprofile { };

torpy = callPackage ../development/python-modules/torpy { };

torrent-parser = callPackage ../development/python-modules/torrent-parser { };
Expand Down

0 comments on commit 37e72af

Please sign in to comment.