Unverified Commit f512d4e6 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

python3Packages.amd-quark: init at 0.11.1 (#498069)

parents b879c7f0 4019a7b8
Loading
Loading
Loading
Loading
+87 −0
Original line number Diff line number Diff line
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  setuptools,
  mypy-protobuf,

  # dependencies
  evaluate,
  joblib,
  ninja,
  numpy,
  onnx,
  onnxscript,
  onnxslim,
  pandas,
  plotly,
  protobuf,
  pydantic,
  rich,
  scipy,
  sentencepiece,
  tqdm,
  zstandard,
}:
buildPythonPackage (finalAttrs: {
  pname = "amd-quark";
  version = "0.11.1";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "amd";
    repo = "Quark";
    tag = "v${finalAttrs.version}";
    hash = "sha256-x0y3NFbXAF1SnlzQSkWKEWiz0qRPYHWvQ6oTizKpyQw=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail '"protobuf-protoc-bin==31.1",' ""
    substituteInPlace setup.py \
      --replace-fail 'subprocess.check_output(["git", "rev-parse", "--short", "HEAD"])' 'b"nix"'
  '';

  env.QUARK_RELEASE = "1";

  build-system = [
    setuptools
    mypy-protobuf
  ];

  dependencies = [
    evaluate
    joblib
    ninja
    numpy
    onnx
    onnxscript
    onnxslim
    pandas
    plotly
    protobuf
    pydantic
    rich
    scipy
    sentencepiece
    tqdm
    zstandard
  ];

  pythonRelaxDeps = true;

  pythonImportsCheck = [ "quark" ];

  # Most of the tests require gpu and some other unspecified dependencies
  doCheck = false;

  meta = {
    description = "AMD Quark Model Optimizer";
    homepage = "https://github.com/amd/Quark";
    changelog = "https://github.com/amd/Quark/releases/tag/${finalAttrs.src.tag}";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ lach ];
  };
})
+2 −0
Original line number Diff line number Diff line
@@ -714,6 +714,8 @@ self: super: with self; {
  amcrest = callPackage ../development/python-modules/amcrest { };
  amd-quark = callPackage ../development/python-modules/amd-quark { };
  amdsmi = toPythonModule (
    pkgs.rocmPackages.amdsmi.override {
      inherit python;