"--",
"-Dwarnings",
]
- - repo: https://github.com/psf/black
- rev: 22.3.0
+ - repo: https://github.com/astral-sh/ruff-pre-commit
+ # Ruff version.
+ rev: v0.12.8
hooks:
- - id: black
- name: "Python (black)"
- args: ["--line-length", "119", "--target-version", "py35"]
- types: ["python"]
+ # Run the linter.
+ - id: ruff-check
+ # Run the formatter.
+ - id: ruff-format
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.11.11
_float8_e8m0: 1,
_float4_e2m1_x2: 1,
}
-if Version(torch.__version__) > Version("2.0.0"):
+if Version(torch.__version__) >= Version("2.3.0"):
_SIZE.update(
{
torch.uint64: 8,
"F8_E4M3": _float8_e4m3fn,
"F8_E5M2": _float8_e5m2,
}
-if Version(torch.__version__) > Version("2.0.0"):
+if Version(torch.__version__) >= Version("2.3.0"):
_TYPES.update(
{
"U64": torch.uint64,