Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Remove attrs dependency and migrate to dataclasses
- Remove attrs from base requirements and constraints
- Replace attr.s decorator with @DataClass in memory_plan.py
- Simplify Region class definition using dataclass
  • Loading branch information
LeiWang1999 committed Feb 13, 2025
commit 3ca6d1bb7237bba0d83e6ff15d25c2edb7f8b92b
2 changes: 0 additions & 2 deletions python/gen_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
(
"Base requirements needed to install tvm",
[
"attrs",
"cloudpickle",
"decorator",
"ml_dtypes",
Expand Down Expand Up @@ -236,7 +235,6 @@
# here. Include a comment linking to context or explaining why the constraint is in place.
CONSTRAINTS = [
("astroid", None),
("attrs", None),
("autodocsumm", None),
("black", "==20.8b1"),
("cloudpickle", None),
Expand Down
5 changes: 2 additions & 3 deletions python/tvm/relay/transform/memory_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"""
from typing import Optional, Dict, List, Tuple
from collections import defaultdict
import attr
from dataclasses import dataclass

from ..expr_functor import ExprMutator
from .. import op, expr
Expand All @@ -41,15 +41,14 @@ def is_primitive(call):
)


@attr.s(auto_attribs=True)
@dataclass
class Region:
"""
Represents a control-free allocation region.

The below pass groups sets of allocations into regions,
then replaces the region with a single allocation.
"""

var: expr.Var
size: expr.Expr
alignment: Optional[expr.Expr]
Expand Down