Skip to content

torch_version_at_least semantics are incorrect #2722

@andrewor14

Description

@andrewor14

We have the following test cases right now:

ao/test/test_utils.py

Lines 16 to 21 in 6cfa477

def test_torch_version_at_least(self):
test_cases = [
("2.5.0a0+git9f17037", "2.5.0", True),
("2.5.0a0+git9f17037", "2.4.0", True),
("2.5.0.dev20240708+cu121", "2.5.0", True),
("2.5.0.dev20240708+cu121", "2.4.0", True),

But this is wrong. The right order should be:

2.4.0 (stable) < 2.5.0.dev / 2.5.0.git < 2.5.0 (stable)

So actually 2.5.0.dev and 2.5.0.git are not "at least" 2.5.0.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions