id int64 0 328k | repository_name stringlengths 7 58 | file_path stringlengths 9 302 | class_name stringlengths 5 256 | human_written_code stringlengths 16 2.16M | class_skeleton stringlengths 18 1.49M ⌀ | total_program_units int64 1 1.76k | total_doc_str int64 0 771 | AvgCountLine float64 0 7.89k | AvgCountLineBlank float64 0 297 | AvgCountLineCode float64 0 7.89k | AvgCountLineComment float64 0 7.89k | AvgCyclomatic float64 0 130 | CommentToCodeRatio float64 0 168 | CountClassBase float64 0 40 | CountClassCoupled float64 0 583 | CountClassCoupledModified float64 0 575 | CountClassDerived float64 0 5.35k | CountDeclInstanceMethod float64 0 529 | CountDeclInstanceVariable float64 0 296 | CountDeclMethod float64 0 599 | CountDeclMethodAll float64 0 1.12k | CountLine float64 1 40.4k | CountLineBlank float64 0 8.16k | CountLineCode float64 1 25.7k | CountLineCodeDecl float64 1 8.15k | CountLineCodeExe float64 0 24.2k | CountLineComment float64 0 16.5k | CountStmt float64 1 9.71k | CountStmtDecl float64 1 8.15k | CountStmtExe float64 0 9.69k | MaxCyclomatic float64 0 759 | MaxInheritanceTree float64 0 16 | MaxNesting float64 0 34 | SumCyclomatic float64 0 2.9k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
327,600 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.MMA | import torch.fx as fx
from ..lang.wave_types import IndexMapping, Memory, Register
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
@define_op('mma')
@dataclas... | @define_op('mma')
@dataclass
class MMA(MMABase):
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
@property
def lhs_type(self) -> Memory:
pass
@property
def rhs_type(self) -> Memory:
pass
@property
def acc_type(self) -> Memory:
pass
def i... | 24 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 7 | 2 | 0 | 12 | 1 | 12 | 71 | 77 | 13 | 64 | 36 | 39 | 0 | 49 | 25 | 35 | 2 | 6 | 1 | 16 |
327,601 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.MMABase | class MMABase(CustomOp):
pass | class MMABase(CustomOp):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 0 | 59 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
327,602 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.NestedRegionOp | import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
class NestedRegionOp(CustomOp):
def captured_vars(self, graph: fx.Graph) -> list[fx.Node]:
"""
Nodes that are placeholders and are not iter args are captured vars.
"""
ca... |
class NestedRegionOp(CustomOp):
def captured_vars(self, graph: fx.Graph) -> list[fx.Node]:
'''
Nodes that are placeholders and are not iter args are captured vars.
'''
pass
def get_outer_node(self, outer_node: fx.Node) -> fx.Node:
pass
def get_captured_fx_node(sel... | 6 | 2 | 9 | 0 | 7 | 2 | 3 | 0.26 | 1 | 5 | 2 | 2 | 5 | 0 | 5 | 64 | 50 | 6 | 35 | 17 | 27 | 9 | 33 | 15 | 27 | 3 | 5 | 2 | 13 |
327,603 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.NewRegister | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from .._support.dtype import DataType, i1
from dataclasses import dataclass, field, fields
from ..lang.wave_types import IndexMapping, Memory, Register
@define_op('register')
@dataclass
class NewRegister(CustomOp):
shape: tuple[IndexExpr, ...]
... | @define_op('register')
@dataclass
class NewRegister(CustomOp):
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
def infer_type(self, *args):
pass | 6 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 2 | 1 | 2 | 61 | 11 | 2 | 9 | 5 | 5 | 0 | 8 | 4 | 5 | 1 | 5 | 0 | 2 |
327,604 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.NewScalar | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from .._support.dtype import DataType, i1
from dataclasses import dataclass, field, fields
@define_op('scalar')
@dataclass
class NewScalar(CustomOp):
value: float | IndexExpr
dtype: DataType
@property
def indexing_dims(self) -> list... | @define_op('scalar')
@dataclass
class NewScalar(CustomOp):
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
def infer_type(self, *args):
pass | 6 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 1 | 2 | 61 | 10 | 2 | 8 | 5 | 4 | 0 | 7 | 4 | 4 | 1 | 5 | 0 | 2 |
327,605 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.Output | from .._support.regions import RegionGraph
from dataclasses import dataclass, field, fields
import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
@dataclass
class Output(CustomOp):
"""
Represents an output node in the graph, representing the return valu... | @dataclass
class Output(CustomOp):
'''
Represents an output node in the graph, representing the return value of a
traced function.
'''
@classmethod
def from_fx_node(cls: Type[CustomOpT], node: fx.Node) -> CustomOpT:
pass
def add_to_graph(self, region_graph: RegionGraph) -> fx.Node:
... | 7 | 1 | 6 | 0 | 6 | 0 | 1 | 0.17 | 1 | 3 | 1 | 0 | 2 | 2 | 3 | 62 | 31 | 4 | 23 | 10 | 17 | 4 | 16 | 8 | 12 | 1 | 5 | 0 | 3 |
327,606 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.Permute | from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from ..lang.wave_types import IndexMapping, Memory, Register
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from abc import ABC
import torch.fx as fx
@define... | @define_op('permute')
@dataclass
class Permute(CustomOp, ABC):
'''
Represents a permute operation that
permutes arg into the target shape.
'''
@property
def indexing_dims(self) -> list[IndexExpr]:
pass
def infer_type(self, *args):
pass
def transform_index(self, index: d... | 7 | 2 | 15 | 0 | 10 | 5 | 1 | 0.53 | 2 | 5 | 2 | 0 | 3 | 1 | 3 | 62 | 57 | 5 | 34 | 16 | 27 | 18 | 21 | 13 | 17 | 2 | 5 | 1 | 4 |
327,607 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.Placeholder | import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from ..lang.wave_types import IndexMapping, Memory, Register
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from .._support.regions impo... | @dataclass
class Placeholder(CustomOp):
'''
Represents a placeholder node in the graph, i.e. an input to a function.
'''
@classmethod
def from_fx_node(cls: Type[PlaceholderT], node: fx.Node) -> PlaceholderT:
pass
def add_to_graph(self, region_graph: RegionGraph) -> fx.Node:
pass... | 15 | 2 | 7 | 1 | 6 | 0 | 2 | 0.1 | 1 | 8 | 3 | 1 | 8 | 2 | 9 | 68 | 81 | 17 | 58 | 28 | 44 | 6 | 54 | 24 | 44 | 5 | 5 | 2 | 18 |
327,608 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.Read | import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from ..lang.wave_types import IndexMapping, Memory, Register
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from .._support.dtype import... | @define_op('read')
@dataclass
class Read(CustomOp):
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
def infer_type(self, *args):
pass
@property
def memory_type(self) -> 'Memory':
pass
@property
def dtype(self) -> DataType:
pass
@property
... | 19 | 3 | 11 | 1 | 7 | 2 | 2 | 0.23 | 1 | 8 | 3 | 0 | 10 | 2 | 10 | 69 | 130 | 24 | 86 | 47 | 62 | 20 | 61 | 37 | 46 | 3 | 5 | 1 | 17 |
327,609 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.ReduceOp | import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from ..lang.wave_types import IndexMapping, Memory, Register
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from abc import ABC
@define... | @define_interface_op('max')
@define_interface_op('min')
@define_interface_op('sum')
@dataclass
class ReduceOp(CustomOp, ABC):
'''
Represents a Reduce computation.
arg: Source tensor/value to reduce
init: init/accumulator for reduce
dim: which symbolic dim to reduce.
block: When set to true, redu... | 10 | 1 | 15 | 0 | 14 | 0 | 3 | 0.16 | 2 | 4 | 1 | 0 | 3 | 1 | 3 | 62 | 63 | 6 | 49 | 19 | 42 | 8 | 31 | 17 | 26 | 5 | 5 | 2 | 9 |
327,610 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.Reshape | import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from abc import ABC
@define_op('reshape')
@dataclass
class Reshape(CustomOp, ABC):
"... | @define_op('reshape')
@dataclass
class Reshape(CustomOp, ABC):
'''
Represents a reshape operation that reshapes
vectors along the same dimension.
'''
@property
def indexing_dims(self) -> list[IndexExpr]:
pass
def infer_type(self, *args):
pass | 6 | 1 | 2 | 0 | 2 | 0 | 1 | 0.5 | 2 | 1 | 0 | 0 | 2 | 1 | 2 | 61 | 16 | 4 | 8 | 5 | 4 | 4 | 7 | 4 | 4 | 1 | 5 | 0 | 2 |
327,611 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.ScaledMMA | import torch.fx as fx
from ..lang.wave_types import IndexMapping, Memory, Register
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
@define_op('scaled_mma')
@d... | @define_op('scaled_mma')
@dataclass
class ScaledMMA(MMABase):
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
@property
def lhs_type(self) -> Memory:
pass
@property
def lhs_scale_type(self) -> Memory:
pass
@property
def rhs_type(self) -> Memory:
... | 33 | 0 | 6 | 0 | 6 | 0 | 1 | 0.01 | 1 | 7 | 2 | 0 | 17 | 2 | 17 | 76 | 137 | 19 | 117 | 49 | 82 | 1 | 66 | 34 | 46 | 2 | 6 | 1 | 21 |
327,612 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.ScanOp | import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from ..lang.wave_types import IndexMapping, Memory, Register
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from abc import ABC
@define... | @define_interface_op('cumsum')
@dataclass
class ScanOp(CustomOp, ABC):
'''
Base class for all scan-style operations (e.g., cumsum).
arg: Source tensor/value to scan.
init: Optional initial value.
dim: Symbolic dimension along which to scan.
'''
@property
def indexing_dims(self) -> list[I... | 8 | 1 | 14 | 2 | 12 | 0 | 4 | 0.17 | 2 | 4 | 1 | 0 | 3 | 1 | 3 | 62 | 59 | 10 | 42 | 17 | 35 | 7 | 32 | 15 | 27 | 7 | 5 | 3 | 11 |
327,613 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.ScatterAdd | import torch.fx as fx
from ..lang.wave_types import IndexMapping, Memory, Register
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
@define_op('scatter_add')
@... | @define_op('scatter_add')
@dataclass
class ScatterAdd(CustomOp):
'''
ScatterAdd performs element-wise accumulation from a source register into shared memory (LDS),
at locations determined by the index register along a specified dimension.
Limitations:
- Only intra-workgroup scattering is supported (... | 14 | 1 | 3 | 0 | 3 | 0 | 1 | 0.27 | 1 | 5 | 2 | 0 | 6 | 1 | 6 | 65 | 46 | 8 | 30 | 18 | 18 | 8 | 25 | 13 | 18 | 2 | 5 | 1 | 7 |
327,614 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.SchedulingBarrier | from dataclasses import dataclass, field, fields
@define_op('scheduling_barrier')
@dataclass
class SchedulingBarrier(CustomOp):
"""
Represents a scheduling barrier in the graph.
Takes in a list of operations that are allowed to cross
the barrier.
"""
operations: list[Operation] | @define_op('scheduling_barrier')
@dataclass
class SchedulingBarrier(CustomOp):
'''
Represents a scheduling barrier in the graph.
Takes in a list of operations that are allowed to cross
the barrier.
'''
pass | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 2.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 8 | 1 | 2 | 1 | 1 | 5 | 2 | 1 | 1 | 0 | 5 | 0 | 0 |
327,615 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.SchedulingGroupBarrier | from dataclasses import dataclass, field, fields
@define_op('scheduling_group_barrier')
@dataclass
class SchedulingGroupBarrier(CustomOp):
"""
Represents a scheduling group barrier in the graph.
The scheduling group barrier defines scheduling groups.
Each scheduling group contains different instruction... | @define_op('scheduling_group_barrier')
@dataclass
class SchedulingGroupBarrier(CustomOp):
'''
Represents a scheduling group barrier in the graph.
The scheduling group barrier defines scheduling groups.
Each scheduling group contains different instructions in a specific order.
The sync_id identifies ... | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 10 | 1 | 3 | 1 | 2 | 6 | 3 | 1 | 2 | 0 | 5 | 0 | 0 |
327,616 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.SelectOp | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from .._support.dtype import DataType, i1
from dataclasses import dataclass, field, fields
import torch.fx as fx
@define_op('select')
@dataclass
class SelectOp(CustomOp):
cond: fx.Node
if_true: fx.Node
if_false: fx.Node
@property
... | @define_op('select')
@dataclass
class SelectOp(CustomOp):
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
def infer_type(self, *args):
pass | 6 | 0 | 13 | 2 | 10 | 1 | 3 | 0.04 | 1 | 3 | 0 | 0 | 2 | 1 | 2 | 61 | 32 | 6 | 25 | 9 | 21 | 1 | 21 | 8 | 18 | 4 | 5 | 1 | 5 |
327,617 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.SelfIndex | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from .._support.dtype import DataType, i1
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from ..lang.wave_types import IndexMapping, Memory, Register
@define... | @define_op('self_index')
@dataclass
class SelfIndex(CustomOp):
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
@property
def type(self) -> 'Register':
pass | 7 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 2 | 0 | 2 | 61 | 12 | 2 | 10 | 6 | 5 | 0 | 8 | 4 | 5 | 1 | 5 | 0 | 2 |
327,618 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.SetSymbol | from dataclasses import dataclass, field, fields
import torch.fx as fx
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
@define_op('set_symbol')
@dataclass
class SetSymbol(CustomOp):
symbol: IndexExpr
register_: fx.Proxy
@property
def type(self) -> 'Register':
return get_c... | @define_op('set_symbol')
@dataclass
class SetSymbol(CustomOp):
@property
def type(self) -> 'Register':
pass
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
@property
def has_side_effects(self) -> bool:
pass | 9 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 3 | 0 | 3 | 62 | 15 | 3 | 12 | 7 | 5 | 0 | 9 | 4 | 5 | 1 | 5 | 0 | 3 |
327,619 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.SetWavePrio | from dataclasses import dataclass, field, fields
@define_op('set_wave_prio')
@dataclass
class SetWavePrio(CustomOp):
"""
An op that sets/tells hardware what level of priority certain instructions/region is.
This is useful for ping-pong or general case where two Waves share the same SIMD, but
we want to... | @define_op('set_wave_prio')
@dataclass
class SetWavePrio(CustomOp):
'''
An op that sets/tells hardware what level of priority certain instructions/region is.
This is useful for ping-pong or general case where two Waves share the same SIMD, but
we want to tell the SIMD to prioritize on wave or the other.... | 5 | 1 | 2 | 0 | 2 | 0 | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 60 | 12 | 2 | 5 | 3 | 2 | 5 | 4 | 2 | 2 | 1 | 5 | 0 | 1 |
327,620 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.SharedMemoryBarrier | from dataclasses import dataclass, field, fields
@define_op('shared_memory_barrier')
@dataclass
class SharedMemoryBarrier(CustomOp):
"""
Represents a shared memory barrier in the graph.
"""
wait_async_ops: bool = False
@property
def has_side_effects(self) -> bool:
return True | @define_op('shared_memory_barrier')
@dataclass
class SharedMemoryBarrier(CustomOp):
'''
Represents a shared memory barrier in the graph.
'''
@property
def has_side_effects(self) -> bool:
pass | 5 | 1 | 2 | 0 | 2 | 0 | 1 | 0.6 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 60 | 10 | 2 | 5 | 4 | 2 | 3 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
327,621 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.ShuffleOp | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
import torch.fx as fx
@define_op('shuffle')
@dataclass
class ShuffleOp(CustomOp):
"""
Represents a shuffle.xor op.
arg: value/vector to shuffle.
offset: xor offset.
width: xor wid... | @define_op('shuffle')
@dataclass
class ShuffleOp(CustomOp):
'''
Represents a shuffle.xor op.
arg: value/vector to shuffle.
offset: xor offset.
width: xor width.
'''
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
def infer_type(self, *args):
pass | 6 | 1 | 2 | 0 | 2 | 0 | 1 | 0.6 | 1 | 1 | 0 | 0 | 2 | 1 | 2 | 61 | 20 | 4 | 10 | 5 | 6 | 6 | 9 | 4 | 6 | 1 | 5 | 0 | 2 |
327,622 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.SoftsignOp | from abc import ABC
from dataclasses import dataclass, field, fields
import torch.fx as fx
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
@define_interface_op('softsign')
@dataclass
class SoftsignOp(CustomOp, ABC):
arg: fx.Node
logit_cap: float = 30.0
apply_scaling: bool = False
... | @define_interface_op('softsign')
@dataclass
class SoftsignOp(CustomOp, ABC):
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
def infer_type(self, *args):
pass | 6 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 2 | 1 | 0 | 0 | 2 | 1 | 2 | 61 | 13 | 2 | 11 | 9 | 7 | 0 | 10 | 8 | 7 | 1 | 5 | 0 | 2 |
327,623 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.UnaryPyOp | import operator
import torch.fx as fx
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from abc import ABC
@define_interface_op('abs')
@define_interface_op('exp')
@define_interface_op('exp2')
@define_interface_op('sqrt')
@define_interface_op('rsqrt'... | @define_interface_op('abs')
@define_interface_op('exp')
@define_interface_op('exp2')
@define_interface_op('sqrt')
@define_interface_op('rsqrt')
@define_interface_op('log2')
@define_interface_op('log10')
@define_interface_op('reciprocal')
@define_interface_op('roundeven')
@define_interface_op('sin')
@define_interface_op... | 24 | 1 | 2 | 0 | 2 | 0 | 1 | 0.27 | 2 | 2 | 0 | 0 | 3 | 1 | 3 | 62 | 18 | 4 | 11 | 8 | 5 | 3 | 9 | 6 | 5 | 1 | 5 | 0 | 3 |
327,624 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.Unknown | from dataclasses import dataclass, field, fields
import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
@final
@dataclass
class Unknown(CustomOp):
"""
Represents an fx.Node that has no corresponding CustomNode class.
"""
args: Sequence[Any]
k... | @final
@dataclass
class Unknown(CustomOp):
'''
Represents an fx.Node that has no corresponding CustomNode class.
'''
@classmethod
def from_fx_node(cls, node: fx.Node) -> 'Unknown':
pass
def custom_string(self, value_map: dict[str, str]) -> str:
pass | 6 | 1 | 5 | 0 | 5 | 1 | 1 | 0.31 | 1 | 2 | 0 | 0 | 1 | 0 | 2 | 61 | 20 | 3 | 13 | 7 | 9 | 4 | 12 | 6 | 9 | 1 | 5 | 0 | 2 |
327,625 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.WorkgroupBarrier | from dataclasses import dataclass, field, fields
@define_op('workgroup_barrier')
@dataclass
class WorkgroupBarrier(CustomOp):
"""
Represents a synchronization of all threads in a workgroup.
Threads will wait on a WorkgroupBarrier until all the threads
in the workgroup has called a WorkgroupBarrier(does... | @define_op('workgroup_barrier')
@dataclass
class WorkgroupBarrier(CustomOp):
'''
Represents a synchronization of all threads in a workgroup.
Threads will wait on a WorkgroupBarrier until all the threads
in the workgroup has called a WorkgroupBarrier(does not have to
be in the same location).
'''... | 5 | 1 | 2 | 0 | 2 | 0 | 1 | 1.5 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 60 | 11 | 1 | 4 | 3 | 1 | 6 | 3 | 2 | 1 | 1 | 5 | 0 | 1 |
327,626 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/ops/wave_ops.py | wave_lang.kernel.ops.wave_ops.Write | from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
from ..lang.wave_types import IndexMapping, Memory, Register
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
import torch.fx as fx
@define_op('write')
@datacl... | @define_op('write')
@dataclass
class Write(CustomOp):
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
def infer_type(self, *args):
pass
@property
def memory_type(self) -> 'Memory':
pass
@property
def register_type(self) -> 'Register':
pass
@... | 17 | 3 | 11 | 1 | 8 | 2 | 2 | 0.18 | 1 | 7 | 2 | 0 | 9 | 2 | 9 | 68 | 122 | 22 | 85 | 46 | 63 | 15 | 61 | 37 | 47 | 3 | 5 | 1 | 16 |
327,627 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/assumptions.py | wave_lang.kernel.wave.assumptions.Assumption | from dataclasses import dataclass
from .._support.indexing import IndexExpr
@dataclass
class Assumption:
"""
Assumptions are sympy assumptions that can be used to
make decisions during code generation. These can be
statements such as bounds on sympy variables. For example,
we can state that
As... | @dataclass
class Assumption:
'''
Assumptions are sympy assumptions that can be used to
make decisions during code generation. These can be
statements such as bounds on sympy variables. For example,
we can state that
Assumption(M < 64)
and then later make queries based on this assumption, suc... | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 5.5 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 5 | 2 | 1 | 1 | 11 | 2 | 1 | 1 | 0 | 0 | 0 | 0 |
327,628 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/barriers.py | wave_lang.kernel.wave.barriers.MemoryAccessType | from enum import Enum, auto
class MemoryAccessType(Enum):
"""Enum to classify memory access operations."""
NONE = auto()
READ = auto()
WRITE = auto()
READ_WRITE = auto() |
class MemoryAccessType(Enum):
'''Enum to classify memory access operations.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 7 | 1 | 5 | 5 | 4 | 1 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
327,629 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/barriers.py | wave_lang.kernel.wave.barriers.SharedMemoryBarrierInfo | import torch.fx as fx
from typing import Optional
from dataclasses import dataclass
@dataclass
class SharedMemoryBarrierInfo:
is_async: bool = False
last_node: Optional[fx.Node] = None | @dataclass
class SharedMemoryBarrierInfo:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 0 | 0 | 0 |
327,630 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/cache.py | wave_lang.kernel.wave.cache.WaveCache | from ..compiler.kernel_codegen import KernelBufferUsage
from .utils.classes import KernelLaunchInfo
from typing import Callable, Optional
from dataclasses import asdict, dataclass
@dataclass
class WaveCache:
"""
Dataclass/Struct that stores necessary information S.T we can
reconstruct and call the "cached"... | @dataclass
class WaveCache:
'''
Dataclass/Struct that stores necessary information S.T we can
reconstruct and call the "cached" kernel.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 5 | 2 | 4 | 4 | 5 | 2 | 4 | 0 | 0 | 0 | 0 |
327,631 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/cache.py | wave_lang.kernel.wave.cache.WaveCacheManager | import os
from pathlib import Path
from .constraints import Constraint, TilingConstraint, WaveConstraint
from collections import OrderedDict, deque
import json
import hashlib
from typing import Callable, Optional
from .compile_options import WaveCompileOptions
import glob
from ..compiler.kernel_codegen import KernelBuf... |
class WaveCacheManager(object):
'''
Wave cache manager has two main components/cache:
1. Session/Online cache - This is the main cache that our compiler and runtime will load from and store to. It is
essentially a dict that uses the kernel hash as keys and the WaveCache as values. We added LRU function... | 11 | 8 | 26 | 0 | 19 | 6 | 3 | 0.42 | 1 | 13 | 5 | 0 | 7 | 6 | 8 | 8 | 238 | 14 | 158 | 65 | 130 | 66 | 94 | 47 | 85 | 4 | 1 | 2 | 22 |
327,632 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/codegen/emitter.py | wave_lang.kernel.wave.codegen.emitter.WaveEmitter | from ..compile_options import WaveCompileOptions
from ...compiler.base import NDEBUG, CodegenError
from dataclasses import dataclass
from ..._support.tracing import CapturedTrace
from ...lang.wave_types import IndexSymbol
from ..utils.general_utils import get_hardware_constraint
from ...compiler.kernel_codegen import B... | @dataclass
class WaveEmitter:
'''Emits a warp function as a `func` with a signature derived from the gm.'''
def __post_init__(self):
pass
def emit_program_invariants(self):
pass
def emit_program_invariants(self):
pass
def finish(self):
pass
def _emit_graph(se... | 14 | 3 | 10 | 0 | 9 | 0 | 2 | 0.04 | 0 | 10 | 5 | 0 | 11 | 5 | 11 | 11 | 128 | 17 | 108 | 33 | 95 | 4 | 75 | 32 | 63 | 5 | 0 | 4 | 26 |
327,633 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/compile.py | wave_lang.kernel.wave.compile.WaveKernel | from ..compiler import host_codegen, kernel_codegen
from .utils.general_utils import wave_dtype_to_torch
from typing import Any, Optional, Callable, Sequence
from .profiling import benchmark_module
from wave_lang.runtime.launch import Launchable
from .compile_options import WaveCompileOptions
from .debug_log_hoist impo... |
class WaveKernel:
'''
Represents a wave kernel that can be invoked by the user.
'''
def __init__(self, options: WaveCompileOptions, executable: Any, asm: str, gpu_binary_path: Optional[str], bound_scalar_symbols: dict[IndexSymbol, int], symbols_args_map: dict[IndexSymbol, tuple[int, int]], trace: Opti... | 7 | 3 | 28 | 3 | 23 | 3 | 5 | 0.16 | 0 | 11 | 4 | 1 | 4 | 12 | 4 | 4 | 170 | 21 | 129 | 55 | 110 | 20 | 80 | 43 | 72 | 18 | 0 | 4 | 27 |
327,634 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/compile.py | wave_lang.kernel.wave.compile.WaveKernelWithProfile | class WaveKernelWithProfile(WaveKernel):
def __call__(self, *args, **kwargs):
return invoke_with_profile(self.options, self.invoke, *args, **kwargs) | class WaveKernelWithProfile(WaveKernel):
def __call__(self, *args, **kwargs):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 5 | 4 | 1 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
327,635 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/compile_options.py | wave_lang.kernel.wave.compile_options.WaveCompileOptions | from .utils.classes import KernelLaunchInfo
from typing import Any, Optional
from ..compiler.kernel_codegen import KernelBufferUsage
from .scheduling.schedule_enums import SchedulingType
from .._support.indexing import IndexSymbol
from dataclasses import dataclass, field
from .._support.location_config import LocationC... | @dataclass
class WaveCompileOptions:
'''
Options for compiling the wave kernel.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 11 | 57 | 55 | 56 | 17 | 55 | 55 | 54 | 0 | 0 | 0 | 0 |
327,636 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.Constraint | from dataclasses import dataclass
from abc import ABC, abstractmethod
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
@dataclass
class Constraint(ABC):
"""
Base class for constraints. Every constraint reduces to
the following form:
Variables: [x0, x1, ...., xN]
Bounds:... | @dataclass
class Constraint(ABC):
'''
Base class for constraints. Every constraint reduces to
the following form:
Variables: [x0, x1, ...., xN]
Bounds: [lb0 <= x0 <= ub0, ..., lbN <= xN <= ubN]
Equality Constraints: [f0(x0, ..., xN) = 0, f1(x0, ..., xN) = 0, ...]
Inequality C... | 4 | 2 | 3 | 0 | 2 | 1 | 1 | 2.25 | 1 | 1 | 1 | 2 | 1 | 0 | 1 | 21 | 14 | 1 | 4 | 3 | 1 | 9 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
327,637 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.DeviceConstraint | from typing import Callable, Optional
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass
from .utils.symbol_utils import get_min_expr, subs_idxc
from sympy import Integer, Piecewise, ceiling, floor
@dataclass
class DeviceConstraint(DistributionConstraint):
"""
... | @dataclass
class DeviceConstraint(DistributionConstraint):
'''
A constraint of the form `tkw.DeviceConstraint(M, DEVICE_M, <device dimension>)` specifies
that we want to distribute dimension M along the device with a tile size of DEVICE_M.
This translates to an index constraint for all tensors of the sh... | 11 | 6 | 10 | 1 | 5 | 4 | 2 | 1.14 | 1 | 3 | 1 | 0 | 6 | 1 | 6 | 30 | 94 | 15 | 37 | 14 | 24 | 42 | 26 | 12 | 18 | 4 | 6 | 1 | 11 |
327,638 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.DistributionConstraint | from dataclasses import dataclass
from typing import Callable, Optional
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
@dataclass
class DistributionConstraint(Constraint):
"""
Base class for constraints that distribute a dimension across a
workgroup or reduction loop.
"""
@p... | @dataclass
class DistributionConstraint(Constraint):
'''
Base class for constraints that distribute a dimension across a
workgroup or reduction loop.
'''
@property
def work_bound(self) -> IndexExpr:
'''
Returns the work bound for the constraint.
It may be different from t... | 7 | 4 | 8 | 1 | 2 | 5 | 1 | 2.11 | 1 | 2 | 0 | 4 | 3 | 0 | 3 | 24 | 33 | 5 | 9 | 6 | 3 | 19 | 7 | 4 | 3 | 1 | 5 | 0 | 3 |
327,639 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.GenericDot | from dataclasses import dataclass
from sympy import Integer, Piecewise, ceiling, floor
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
@dataclass
class GenericDot:
"""
mma implemented through vector dot products intead of hw intrinsics.
`out_vec_size`: size of the output matrix vecto... | @dataclass
class GenericDot:
'''
mma implemented through vector dot products intead of hw intrinsics.
`out_vec_size`: size of the output matrix vector
`k_vec_size`: size of the reduction dimension vector
`k_mult`: number of reduction dimension vectors
'''
def __post_init__(self):
pa... | 8 | 1 | 8 | 0 | 8 | 0 | 2 | 0.12 | 0 | 4 | 1 | 0 | 6 | 0 | 6 | 6 | 64 | 8 | 50 | 29 | 37 | 6 | 38 | 23 | 31 | 2 | 0 | 1 | 11 |
327,640 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.HardwareConstraint | from typing import Callable, Optional
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from .._support.dtype import DataType
from dataclasses import dataclass
from sympy import Integer, Piecewise, ceiling, floor
@dataclass
class HardwareConstraint(Constraint):
"""
A constraint of the form
... | @dataclass
class HardwareConstraint(Constraint):
'''
A constraint of the form
tkw.HardwareConstraint(threads_per_wave = N,
mma_type = 'MFMA_F32_16x16x16_F16')
specifies that the hardware supports N threads per wave and that
we want all mma operations in the microke... | 14 | 1 | 31 | 0 | 30 | 7 | 4 | 0.28 | 1 | 11 | 6 | 0 | 10 | 0 | 10 | 31 | 350 | 17 | 308 | 40 | 228 | 85 | 85 | 29 | 70 | 11 | 5 | 2 | 43 |
327,641 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.IteratorBindings | from dataclasses import dataclass
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
@dataclass
class IteratorBindings:
"""Manages binding of target dimensions to iterators"""
def __init__(self, bindings: dict[IndexSymbol, IndexSymbol]):
self.bindings = bindings
def __repr__(se... | @dataclass
class IteratorBindings:
'''Manages binding of target dimensions to iterators'''
def __init__(self, bindings: dict[IndexSymbol, IndexSymbol]):
pass
def __repr__(self):
pass | 4 | 1 | 2 | 0 | 2 | 0 | 1 | 0.2 | 0 | 1 | 0 | 0 | 2 | 1 | 2 | 2 | 8 | 2 | 5 | 4 | 2 | 1 | 5 | 4 | 2 | 1 | 0 | 0 | 2 |
327,642 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.MMAOperand | from enum import Enum
class MMAOperand(Enum):
M = 0
N = 1
K = 2 |
class MMAOperand(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
327,643 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.MMAType | from enum import Enum
class MMAType(Enum):
F32_16x16x16_F16 = 4128
F32_32x32x8_F16 = 4129
F32_16x16x32_K8_F16 = 4130
F32_32x32x16_K8_F16 = 4131
I32_16x16x16_I8 = 4288
I32_32x32x8_I8 = 4289
F32_16x16x32_F8 = 4656
F32_32x32x16_F8 = 4657
F32_16x16x32_K4_F8 = 4658
F32_32x32x16_K4_F8... |
class MMAType(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.15 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 16 | 1 | 13 | 13 | 12 | 2 | 13 | 13 | 12 | 0 | 4 | 0 | 0 |
327,644 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.ReorderingConstraint | from dataclasses import dataclass
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
@dataclass
class ReorderingConstraint:
"""
A constraint of the form `tkw.ReorderingConstraint(new_wg0, 0)`
specifies how workgroups are mapped to data along workgroup dim 0,
according to the 'new_wg0... | @dataclass
class ReorderingConstraint:
'''
A constraint of the form `tkw.ReorderingConstraint(new_wg0, 0)`
specifies how workgroups are mapped to data along workgroup dim 0,
according to the 'new_wg0' expression.
The internal indexing of waves and threads within the workgroup do not change.
The ... | 3 | 1 | 7 | 0 | 7 | 0 | 2 | 0.9 | 0 | 1 | 0 | 0 | 1 | 1 | 1 | 1 | 21 | 2 | 10 | 3 | 7 | 9 | 8 | 4 | 5 | 2 | 0 | 0 | 2 |
327,645 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.ScaledMMAType | from enum import Enum
class ScaledMMAType(Enum):
F32_16x16x128_F8F6F4 = 4928
F32_32x32x64_F8F6F4 = 4929 |
class ScaledMMAType(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 4 | 0 | 3 | 3 | 2 | 1 | 3 | 3 | 2 | 0 | 4 | 0 | 0 |
327,646 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.TilingConstraint | from typing import Callable, Optional
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass
from .utils.symbol_utils import get_min_expr, subs_idxc
from sympy import Integer, Piecewise, ceiling, floor
@dataclass
class TilingConstraint(DistributionConstraint):
"""
... | @dataclass
class TilingConstraint(DistributionConstraint):
'''
A constraint of the form `tkw.TilingConstraint(K, BLOCK_K)` specifies
that we want to tile the K dimension with a tile size of BLOCK_K. This
adds an index constraint to the K-th dimension of a tensor of the form
BLOCK_K * i, where i is t... | 12 | 2 | 7 | 0 | 5 | 1 | 2 | 0.28 | 1 | 3 | 1 | 0 | 7 | 0 | 7 | 31 | 70 | 10 | 47 | 17 | 36 | 13 | 33 | 14 | 25 | 3 | 6 | 1 | 13 |
327,647 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.WaveConstraint | from typing import Callable, Optional
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass
from .utils.symbol_utils import get_min_expr, subs_idxc
from sympy import Integer, Piecewise, ceiling, floor
@dataclass
class WaveConstraint(DistributionConstraint):
"""
... | @dataclass
class WaveConstraint(DistributionConstraint):
'''
A constraint of the form `tkw.WaveConstraint(K, WAVE_K)` specifies
that we want distribute the K dimension among multiple waves which
each wave operating on a tile size of WAVE_K. The assumption is
that the K dimension has already been dis... | 9 | 2 | 10 | 0 | 8 | 1 | 2 | 0.65 | 1 | 5 | 3 | 0 | 5 | 0 | 5 | 29 | 86 | 10 | 46 | 16 | 34 | 30 | 30 | 10 | 24 | 2 | 6 | 1 | 10 |
327,648 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/constraints.py | wave_lang.kernel.wave.constraints.WorkgroupConstraint | from typing import Callable, Optional
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass
from .utils.symbol_utils import get_min_expr, subs_idxc
from sympy import Integer, Piecewise, ceiling, floor
@dataclass
class WorkgroupConstraint(DistributionConstraint):
""... | @dataclass
class WorkgroupConstraint(DistributionConstraint):
'''
A constraint of the form `tkw.WorkgroupConstraint(M, BLOCK_M, 0)`
specifies that we want to distribute dimension M along workgroup dim 0
with a tile size of BLOCK_M resulting in M // BLOCK_M workgroups along that
dimension. This trans... | 12 | 3 | 7 | 1 | 5 | 1 | 2 | 0.36 | 1 | 3 | 1 | 0 | 7 | 1 | 7 | 31 | 76 | 12 | 47 | 18 | 35 | 17 | 36 | 16 | 27 | 3 | 6 | 1 | 12 |
327,649 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/debug_log_hoist.py | wave_lang.kernel.wave.debug_log_hoist.DebugArgInfo | from .._support.dtype import DataType
from .._support.indexing import IndexSymbol
from typing import TypedDict, Any
class DebugArgInfo(TypedDict):
symbol_name: str
debug_output_arg_id: int
dtype: DataType
symbolic_shape: tuple[IndexSymbol, ...]
printer: Any |
class DebugArgInfo(TypedDict):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 1 | 5 | 0 | 6 | 1 | 5 | 0 | 1 | 0 | 0 |
327,650 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/gather_to_shared.py | wave_lang.kernel.wave.gather_to_shared.GatherToSharedConfig | from dataclasses import dataclass
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol, xor
@dataclass
class GatherToSharedConfig:
materialized_shape: list[IndexSymbol]
elements_per_thread: int
expected_number_of_loads: int | @dataclass
class GatherToSharedConfig:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 0 | 0 | 0 |
327,651 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/in_thread_transpose.py | wave_lang.kernel.wave.in_thread_transpose.TransposeConfig | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from typing import Optional, Sequence
from dataclasses import dataclass
@dataclass
class TransposeConfig:
"""
Configuration for in-thread transpose.
"""
load_elems_per_thread: int
expected_number_of_loads: int
expected_number... | @dataclass
class TransposeConfig:
'''
Configuration for in-thread transpose.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.38 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 1 | 8 | 1 | 7 | 3 | 8 | 1 | 7 | 0 | 0 | 0 | 0 |
327,652 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/minimize_global_loads.py | wave_lang.kernel.wave.minimize_global_loads.SharedReadMetadata | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from ..lang.wave_types import IndexMapping
from dataclasses import dataclass
@dataclass
class SharedReadMetadata:
index: dict[IndexSymbol, IndexSequence]
mapping: IndexMapping
memory_shape: tuple[int | IndexExpr] | @dataclass
class SharedReadMetadata:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 0 | 0 | 0 |
327,653 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/nn/linear.py | wave_lang.kernel.wave.nn.linear.WaveLinear | from torch import nn
import torch
import math
class WaveLinear(nn.Module):
"""Fork of nn.Linear implementation but modified to handle Wave Kernel"""
def __init__(self, in_features, out_features, bias=True, device=None, dtype=None):
device = device or torch.device('cuda:0')
dtype = dtype or tor... |
class WaveLinear(nn.Module):
'''Fork of nn.Linear implementation but modified to handle Wave Kernel'''
def __init__(self, in_features, out_features, bias=True, device=None, dtype=None):
pass
def reset_parameters(self) -> None:
pass
def forward(self, input: torch.Tensor) -> torch.Tens... | 5 | 1 | 17 | 2 | 13 | 2 | 3 | 0.17 | 1 | 3 | 0 | 0 | 4 | 5 | 4 | 4 | 72 | 10 | 53 | 19 | 48 | 9 | 38 | 19 | 33 | 4 | 1 | 1 | 10 |
327,654 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/nn/quant_linear.py | wave_lang.kernel.wave.nn.quant_linear.WaveQuantLinear | from torch import nn
import torch
import warnings
import math
class WaveQuantLinear(nn.Module):
"""Fork of nn.Linear implementation but modified to handle Wave Kernel"""
def __init__(self, in_features, out_features, quant_params, bias=True, device=None, dtype=None):
device = device or torch.device('cu... |
class WaveQuantLinear(nn.Module):
'''Fork of nn.Linear implementation but modified to handle Wave Kernel'''
def __init__(self, in_features, out_features, quant_params, bias=True, device=None, dtype=None):
pass
def reset_parameters(self) -> None:
pass
def forward(self, input: torch.Te... | 5 | 1 | 22 | 1 | 19 | 2 | 3 | 0.12 | 1 | 3 | 0 | 0 | 4 | 8 | 4 | 4 | 93 | 9 | 75 | 28 | 62 | 9 | 45 | 20 | 40 | 7 | 1 | 1 | 13 |
327,655 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/schedule_reordering.py | wave_lang.kernel.wave.schedule_reordering.CompatibleBlockSize | from dataclasses import dataclass
@dataclass
class CompatibleBlockSize:
block_m: int
block_n: int
block_k: int
bitwidth: int
mma_type: type | @dataclass
class CompatibleBlockSize:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 1 | 5 | 0 | 6 | 1 | 5 | 0 | 0 | 0 | 0 |
327,656 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/schedule_reordering.py | wave_lang.kernel.wave.schedule_reordering.InsertionMode | from enum import Enum
class InsertionMode(Enum):
BEFORE = 0
AFTER = 1 |
class InsertionMode(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 4 | 0 | 0 |
327,657 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/schedule_reordering.py | wave_lang.kernel.wave.schedule_reordering.InsertionPoint | from typing import Iterable, Dict, List
from .utils.general_utils import flatten_list, get_hardware_constraint, is_shared_read, topological_sort_with_dependencies
import torch.fx as fx
class InsertionPoint(object):
"""
Helper class to keep track of movements/insertion of ops into very
precise/specific loca... |
class InsertionPoint(object):
'''
Helper class to keep track of movements/insertion of ops into very
precise/specific locations before or after an another op
(referred here as "anchor op".)
'''
def __init__(self, mode: InsertionMode, op: fx.Node, anchor_op: fx.Node | Iterable[fx.Node]):
... | 4 | 1 | 12 | 1 | 10 | 1 | 4 | 0.32 | 1 | 2 | 1 | 0 | 2 | 3 | 2 | 2 | 33 | 4 | 22 | 9 | 16 | 7 | 16 | 6 | 13 | 6 | 1 | 2 | 7 |
327,658 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/schedule_reordering.py | wave_lang.kernel.wave.schedule_reordering.SchedReorderStrategy | from enum import Enum
class SchedReorderStrategy(Enum):
NONE = 0
TWO_PP_CLUSTER = 544
MXFP4_PP_CLUSTER = 257 |
class SchedReorderStrategy(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
327,659 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/four_stage_pipelined_scheduling.py | wave_lang.kernel.wave.scheduling.four_stage_pipelined_scheduling.FourStageScheduler | from .graph_utils import Edge, sort_graph_by_edge_weight
from .scheduler_utils import get_scheduling_stage, BaseScheduler, is_single_mma_source, is_mma_node
import torch.fx as fx
class FourStageScheduler(BaseScheduler):
"""
Four Stage Pipelined Scheduler
Precondition: Only a single MMA instruction group i... |
class FourStageScheduler(BaseScheduler):
'''
Four Stage Pipelined Scheduler
Precondition: Only a single MMA instruction group is allowed for this scheduling approach
Convert vanilla schedule of:
for i = 0 to N:
a = READ_GLOBAL i
WRITE_SHARED a
barrier
... | 3 | 3 | 24 | 2 | 17 | 6 | 4 | 1.26 | 1 | 7 | 2 | 0 | 2 | 2 | 2 | 5 | 94 | 17 | 34 | 14 | 29 | 43 | 26 | 12 | 23 | 6 | 1 | 2 | 7 |
327,660 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/four_stage_pipelined_scheduling.py | wave_lang.kernel.wave.scheduling.four_stage_pipelined_scheduling.FourStageStage | from enum import Enum, auto
class FourStageStage(Enum):
GLOBAL_LOAD = auto()
LOCAL_STORE = auto()
LOCAL_LOAD = auto()
COMPUTE = auto()
SCHEDULING_NOOP = -1
@staticmethod
def is_valid_transition(from_stage: 'FourStageStage', to_stage: 'FourStageStage') -> bool:
if from_stage == to_s... |
class FourStageStage(Enum):
@staticmethod
def is_valid_transition(from_stage: 'FourStageStage', to_stage: 'FourStageStage') -> bool:
pass | 3 | 0 | 6 | 0 | 6 | 0 | 2 | 0.08 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 50 | 15 | 1 | 13 | 10 | 8 | 1 | 10 | 7 | 8 | 2 | 4 | 1 | 2 |
327,661 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/graph_utils.py | wave_lang.kernel.wave.scheduling.graph_utils.Edge | import torch.fx as fx
from dataclasses import dataclass
@dataclass
class Edge:
_from: fx.Node = None
_to: fx.Node = None
weight: EdgeWeight = None | @dataclass
class Edge:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 0 | 0 | 0 |
327,662 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/graph_utils.py | wave_lang.kernel.wave.scheduling.graph_utils.EdgeWeight | from dataclasses import dataclass
@dataclass
class EdgeWeight:
iteration_difference: int = 0
delay: int = 0 | @dataclass
class EdgeWeight:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 0 | 0 | 0 |
327,663 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/loop_reconstruction.py | wave_lang.kernel.wave.scheduling.loop_reconstruction.PipelineStage | from enum import Enum
class PipelineStage(Enum):
PROLOGUE = 0
KERNEL = 1
EPILOGUE = 2 |
class PipelineStage(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
327,664 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/loop_reconstruction_utils.py | wave_lang.kernel.wave.scheduling.loop_reconstruction_utils.ArgumentContext | from ...ops.wave_ops import GatherToLDS, GetResult, IterArg, Iterate, Write, get_custom
from typing import Optional, Sequence
import torch.fx as fx
class ArgumentContext:
"""
The argument context is used to store the mapping of arguments
for each modulo pipelining stage.
"""
def __init__(self, res... |
class ArgumentContext:
'''
The argument context is used to store the mapping of arguments
for each modulo pipelining stage.
'''
def __init__(self, results: list[fx.Node], iter_args: list[fx.Node], init_args: list[fx.Node], num_stages: int) -> None:
pass
def map_arg_all(self, from_: fx... | 15 | 14 | 11 | 0 | 8 | 3 | 3 | 0.46 | 0 | 7 | 0 | 0 | 14 | 8 | 14 | 14 | 178 | 17 | 110 | 54 | 87 | 51 | 85 | 45 | 70 | 6 | 0 | 3 | 37 |
327,665 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/modulo_scheduling.py | wave_lang.kernel.wave.scheduling.modulo_scheduling.ModuloScheduler | import numpy as np
import torch.fx as fx
from .graph_utils import Edge, all_pairs_longest_paths_evaluated, all_pairs_longest_paths_unevaluated, find_cycles_in_scc, find_strongly_connected_components, topological_sort, topological_sort_nodes
from .scheduler_utils import BaseScheduler
from typing import Callable
class M... |
class ModuloScheduler(BaseScheduler):
'''
Vanilla Modulo Scheduler.
References:
[1] Aho, Alfred V., et al. "Compilers: Principles, Techniques, and Tools."
'''
def __init__(self, graph: fx.Graph, edges: list[Edge], resources: list[int]) -> None:
pass
def get_edge(self, from_node: f... | 14 | 11 | 19 | 1 | 15 | 3 | 3 | 0.24 | 1 | 10 | 1 | 0 | 12 | 8 | 12 | 15 | 246 | 20 | 182 | 73 | 152 | 44 | 124 | 52 | 111 | 9 | 1 | 4 | 39 |
327,666 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/optimize_schedule.py | wave_lang.kernel.wave.scheduling.optimize_schedule.OptimizationAlgorithm | from enum import Enum, auto
class OptimizationAlgorithm(Enum):
HILL_CLIMBING = auto() |
class OptimizationAlgorithm(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 4 | 0 | 0 |
327,667 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/optimize_schedule.py | wave_lang.kernel.wave.scheduling.optimize_schedule.OptimizationResult | from typing import Callable, Dict, List, Optional, Tuple
from dataclasses import dataclass
@dataclass
class OptimizationResult:
schedule: Dict
latency: float
iterations: int
algorithm: OptimizationAlgorithm
improvement_history: List[float] | @dataclass
class OptimizationResult:
pass | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0 | 6 | 1 | 5 | 0 | 6 | 1 | 5 | 0 | 0 | 0 | 0 |
327,668 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/optimize_schedule.py | wave_lang.kernel.wave.scheduling.optimize_schedule.ScheduleOptimizer | import random
from .verifier import ScheduleValidator as ScheduleModifier
from wave_lang.kernel.wave.scheduling.resources import Operation, get_custom_operation_type
from wave_lang.kernel.wave.tuner.utils import format_latency_us, latency_to_us
import numpy as np
from wave_lang.kernel.ops.wave_ops import get_custom
fro... |
class ScheduleOptimizer:
def __init__(self, validator: ScheduleModifier, measure_fn: Callable[[Dict], float], algorithm: OptimizationAlgorithm=OptimizationAlgorithm.HILL_CLIMBING, logger: Optional[logging.Logger]=None, progress_file: Optional[str]=None, tuning_logger=None, random_seed: Optional[int]=None):
... | 14 | 13 | 29 | 4 | 17 | 8 | 3 | 0.45 | 0 | 10 | 3 | 0 | 13 | 11 | 13 | 13 | 392 | 62 | 228 | 92 | 173 | 102 | 121 | 47 | 107 | 7 | 0 | 3 | 37 |
327,669 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/prefetch_scheduling.py | wave_lang.kernel.wave.scheduling.prefetch_scheduling.MMAGroup | from ...ops.wave_ops import get_custom, Read, Write, MMA, ScaledMMA, IterArg, Reshape, Extract
from ..utils.classes import AttentionOperationType
import torch.fx as fx
class MMAGroup:
"""Groups MMA operations and their dependencies for prefetch scheduling."""
VALID_SUFFIXES = {'0', '1'}
def __init__(self,... |
class MMAGroup:
'''Groups MMA operations and their dependencies for prefetch scheduling.'''
def __init__(self, mma_ops: list[fx.Node]):
pass
def add_nodes(self, nodes: list[fx.Node]):
pass
def _get_operation_type(self, suffix: str, operation_category: str) -> AttentionOperationType:
... | 7 | 4 | 6 | 0 | 6 | 0 | 2 | 0 | 0 | 2 | 0 | 0 | 3 | 4 | 3 | 3 | 20 | 2 | 18 | 10 | 14 | 0 | 16 | 10 | 12 | 5 | 0 | 3 | 7 |
327,670 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/prefetch_scheduling.py | wave_lang.kernel.wave.scheduling.prefetch_scheduling.PrefetchAttentionScheduler | from .scheduler_utils import get_scheduling_stage, BaseScheduler
import torch.fx as fx
from ..utils.graph_utils import capture_backward_slice
from typing import Sequence
from ...ops.wave_ops import get_custom, Read, Write, MMA, ScaledMMA, IterArg, Reshape, Extract
from ..utils.classes import AttentionOperationType
cla... |
class PrefetchAttentionScheduler(BaseScheduler):
def schedule_graph(self) -> tuple[dict[fx.Node, int], bool]:
'''
Implements attention-specific prefetch scheduling with the following cycle assignments:
- Cycle 0: Global loads and shared writes for GEMM0
- Cycle 1: Shared reads for ... | 6 | 5 | 41 | 5 | 28 | 8 | 5 | 0.28 | 1 | 7 | 1 | 0 | 5 | 2 | 5 | 8 | 210 | 28 | 142 | 57 | 125 | 40 | 105 | 47 | 98 | 9 | 1 | 6 | 26 |
327,671 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/prefetch_scheduling.py | wave_lang.kernel.wave.scheduling.prefetch_scheduling.PrefetchScheduler | from .graph_utils import Edge, sort_graph_by_edge_weight
from .scheduler_utils import get_scheduling_stage, BaseScheduler
import torch.fx as fx
class PrefetchScheduler(BaseScheduler):
"""
Prefetch Scheduler
Convert vanilla schedule of:
for i = 0 to N:
a = READ_GLOBAL i
WRIT... |
class PrefetchScheduler(BaseScheduler):
'''
Prefetch Scheduler
Convert vanilla schedule of:
for i = 0 to N:
a = READ_GLOBAL i
WRITE_SHARED a
barrier
b = READ_SHARED
COMPUTE b
into prefetch schedule:
a_0 = READ_GLOBAL 0
... | 3 | 3 | 22 | 1 | 16 | 6 | 4 | 1.06 | 1 | 7 | 2 | 0 | 2 | 2 | 2 | 5 | 73 | 5 | 33 | 10 | 30 | 35 | 27 | 10 | 24 | 4 | 1 | 2 | 7 |
327,672 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/prefetch_scheduling.py | wave_lang.kernel.wave.scheduling.prefetch_scheduling.PrefetchStage | from enum import Enum
class PrefetchStage(Enum):
GLOBAL_LOAD = 0
LOCAL_STORE = 1
LOCAL_LOAD = 2
COMPUTE = 3
@staticmethod
def is_valid_transition(from_stage: 'PrefetchStage', to_stage: 'PrefetchStage') -> bool:
if from_stage == to_stage:
return True
return (from_sta... |
class PrefetchStage(Enum):
@staticmethod
def is_valid_transition(from_stage: 'PrefetchStage', to_stage: 'PrefetchStage') -> bool:
pass | 3 | 0 | 7 | 1 | 6 | 0 | 2 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 50 | 14 | 2 | 12 | 9 | 7 | 0 | 9 | 6 | 7 | 2 | 4 | 1 | 2 |
327,673 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/resources.py | wave_lang.kernel.wave.scheduling.resources.Operation | from enum import Enum
class Operation(Enum):
READ_SHARED = 'read_shared'
WRITE_SHARED = 'write_shared'
READ_GLOBAL = 'read_global'
WRITE_GLOBAL = 'write_global'
GLOBAL_TO_SHARED = 'global_to_shared'
MMA = 'mma'
ALU = 'alu'
VALU = 'valu'
SALU = 'salu'
NOOP = 'noop'
SHUFFLE = ... |
class Operation(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 12 | 0 | 12 | 12 | 11 | 0 | 12 | 12 | 11 | 0 | 4 | 0 | 0 |
327,674 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/schedule_enums.py | wave_lang.kernel.wave.scheduling.schedule_enums.SchedulingType | from enum import Enum
class SchedulingType(Enum):
NONE = 0
MODULO = 16
PREFETCH = 32
FOUR_STAGE = 33
PREFETCH_ATTENTION = 34 |
class SchedulingType(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 6 | 0 | 6 | 6 | 5 | 0 | 6 | 6 | 5 | 0 | 4 | 0 | 0 |
327,675 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/scheduler_utils.py | wave_lang.kernel.wave.scheduling.scheduler_utils.BaseScheduler | import torch.fx as fx
import math
from .graph_utils import Edge
class BaseScheduler:
def __init__(self, graph: fx.Graph, edges: list[Edge], resources: list[int]) -> None:
self.graph = graph
self.edges = edges
self.resources = resources
self.seed = 2024
@property
def initia... |
class BaseScheduler:
def __init__(self, graph: fx.Graph, edges: list[Edge], resources: list[int]) -> None:
pass
@property
def initiation_interval(self) -> int:
'''
Returns the initiation interval of the schedule.
'''
pass
@property
def num_stages(self) -> in... | 6 | 2 | 7 | 0 | 5 | 2 | 1 | 0.33 | 0 | 3 | 1 | 4 | 3 | 4 | 3 | 3 | 26 | 2 | 18 | 16 | 7 | 6 | 11 | 9 | 7 | 1 | 0 | 0 | 3 |
327,676 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/verifier.py | wave_lang.kernel.wave.scheduling.verifier.ResourceUsageTracker | from typing import Callable, Dict, List, Optional, Tuple, TypeAlias
import torch.fx as fx
import numpy as np
class ResourceUsageTracker:
"""Tracks and validates resource usage across scheduling cycles."""
def __init__(self, resource_limits: np.ndarray, T: int, num_resource_types: int):
self.resource_l... |
class ResourceUsageTracker:
'''Tracks and validates resource usage across scheduling cycles.'''
def __init__(self, resource_limits: np.ndarray, T: int, num_resource_types: int):
pass
def _get_node_duration(self, node: fx.Node, node_rrt_getter: NodeRRTGetter) -> int:
pass
def _apply_n... | 7 | 1 | 9 | 0 | 9 | 0 | 2 | 0.02 | 0 | 3 | 0 | 0 | 6 | 4 | 6 | 6 | 60 | 6 | 53 | 30 | 34 | 1 | 29 | 18 | 22 | 4 | 0 | 2 | 12 |
327,677 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/verifier.py | wave_lang.kernel.wave.scheduling.verifier.ScheduleConstraintRepairer | from typing import Callable, Dict, List, Optional, Tuple, TypeAlias
from .graph_utils import Edge
import torch.fx as fx
class ScheduleConstraintRepairer:
"""Repairs schedule violations by moving operations to satisfy resource and dependency constraints."""
def __init__(self, graph: ScheduleDependencyGraph, ed... |
class ScheduleConstraintRepairer:
'''Repairs schedule violations by moving operations to satisfy resource and dependency constraints.'''
def __init__(self, graph: ScheduleDependencyGraph, edges: List[Edge], T: int):
pass
def _repair_schedule(self, schedule: Schedule, resource_tracker: ResourceUsa... | 10 | 5 | 27 | 2 | 18 | 7 | 3 | 0.42 | 0 | 7 | 3 | 0 | 7 | 4 | 7 | 7 | 223 | 29 | 137 | 64 | 94 | 57 | 63 | 31 | 53 | 6 | 0 | 4 | 26 |
327,678 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/scheduling/verifier.py | wave_lang.kernel.wave.scheduling.verifier.ScheduleDependencyGraph | import torch.fx as fx
from typing import Callable, Dict, List, Optional, Tuple, TypeAlias
class ScheduleDependencyGraph:
"""Represents and manages the dependency relationships between scheduled operations."""
def __init__(self, nodes: List[fx.Node], edges: RawEdgesList=None):
self.nodes = list(nodes)
... |
class ScheduleDependencyGraph:
'''Represents and manages the dependency relationships between scheduled operations.'''
def __init__(self, nodes: List[fx.Node], edges: RawEdgesList=None):
pass
def _build_adjacency_list(self, edges_input: RawEdgesList, is_successors: bool) -> Dict[fx.Node, List[fx.... | 6 | 1 | 5 | 0 | 5 | 0 | 2 | 0.07 | 0 | 3 | 0 | 0 | 5 | 5 | 5 | 5 | 34 | 5 | 27 | 15 | 19 | 2 | 24 | 13 | 18 | 5 | 0 | 3 | 10 |
327,679 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/symbolic_constraints.py | wave_lang.kernel.wave.symbolic_constraints.SymbolicAlias | from typing import Callable
from dataclasses import dataclass
from wave_lang.kernel._support.indexing import IndexExpr, IndexSymbol
from .constraints import Constraint, TilingConstraint, WaveConstraint, WorkgroupConstraint
from .utils.symbol_utils import subs_idxc
@dataclass
class SymbolicAlias:
"""
A constrai... | @dataclass
class SymbolicAlias:
'''
A constraint of the form `tkw.SymbolicConstraint(K, SYMBOLIC_K)` specifies
that the relationship between the source and target symbols is given by
source = source_to_target(target).
SymbolicAliases are modeled in the compiler as additional workgroup, wave,
and... | 10 | 2 | 17 | 1 | 15 | 2 | 5 | 0.39 | 0 | 5 | 4 | 0 | 2 | 0 | 2 | 2 | 51 | 5 | 33 | 8 | 28 | 13 | 24 | 9 | 20 | 8 | 0 | 3 | 9 |
327,680 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/templates/attention_common.py | wave_lang.kernel.wave.templates.attention_common.AttentionShape | from typing import Optional
from dataclasses import dataclass, fields
@dataclass(frozen=True)
class AttentionShape:
num_query_heads: int
num_kv_heads: int
head_size: int
head_size_kv: int
batch_size: Optional[int] = None
num_seqs: Optional[int] = None
max_seq_len: Optional[int] = None
t... | @dataclass(frozen=True)
class AttentionShape:
def __iter__(self):
pass | 3 | 0 | 5 | 0 | 5 | 0 | 3 | 0.35 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 28 | 1 | 20 | 14 | 18 | 7 | 20 | 14 | 18 | 3 | 0 | 2 | 3 |
327,681 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/wave.py | wave_lang.kernel.wave.wave.LaunchableWave | from ..lang import Grid, Memory, SymbolBind
from .decompose_dot_mma import decompose_dot_mma
from .utils.general_utils import delinearize_index, get_hardware_constraint, partial, remove_files_with_extension
from ..compiler import builder, dispatch_codegen, kernel_codegen
from .utils.compile_utils import canonicalize_mo... | null | 37 | 7 | 23 | 2 | 19 | 2 | 3 | 0.12 | 1 | 28 | 16 | 0 | 23 | 8 | 23 | 23 | 624 | 81 | 484 | 160 | 415 | 59 | 238 | 114 | 211 | 14 | 1 | 3 | 80 |
327,682 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/wave_sim.py | wave_lang.kernel.wave.wave_sim._RegisterProxy | class _RegisterProxy:
def __getitem__(self, indices: tuple[...]):
shape = indices[:-1]
dtype = indices[-1]
return _ShapedRegister(shape, dtype) | class _RegisterProxy:
def __getitem__(self, indices: tuple[...]):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 0 | 2 | 1 | 0 | 1 | 0 | 1 | 1 | 5 | 0 | 5 | 4 | 3 | 0 | 5 | 4 | 3 | 1 | 0 | 0 | 1 |
327,683 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/wave_sim.py | wave_lang.kernel.wave.wave_sim._ShapedRegister | from typing import Any, Callable, Optional, TypeAlias
import torch
class _ShapedRegister:
def __init__(self, shape: tuple[IndexExpr, ...], dtype: Any) -> None:
self.shape = shape
self.dtype = dtype
def __call__(self, init: Any) -> 'Register':
return torch.full(self.shape, init, dtype=... |
class _ShapedRegister:
def __init__(self, shape: tuple[IndexExpr, ...], dtype: Any) -> None:
pass
def __call__(self, init: Any) -> 'Register':
pass | 3 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 0 | 2 | 0 | 0 | 2 | 2 | 2 | 2 | 7 | 1 | 6 | 5 | 3 | 0 | 6 | 5 | 3 | 1 | 0 | 0 | 2 |
327,684 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/wave_sim.py | wave_lang.kernel.wave.wave_sim._TklProxy | import torch
class _TklProxy:
f16 = torch.float16
f32 = torch.float32
Register = _RegisterProxy() |
class _TklProxy:
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 0 | 0 | 0 |
327,685 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/kernel/wave/wave_sim.py | wave_lang.kernel.wave.wave_sim._TkwProxy | class _TkwProxy:
iterate = _iterate_proxy
read = _read_proxy
write = _write_proxy
mma = _mma_proxy | class _TkwProxy:
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 0 | 0 | 0 |
327,686 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/device.py | wave_lang.runtime.device.Device | import torch
import atexit
from typing import Any, Callable, Dict, Optional, Union
from iree.runtime import BufferUsage, ExternalTimepointFlags, HalBufferView, HalDevice, HalDriver, HalExternalTimepoint, MemoryType, SemaphoreCompatibility, VmInstance, VmModule, create_hal_module, get_driver
class Device:
"""Repres... |
class Device:
'''Represents a low-level device (HalDriver/HalDevice) and scheduling data.
This is the type that user's interact with as a 'Device'. Devices can be handled
loose-leaf or bound to a thread with a context manager.
'''
def _try_clean_external_timepoints(self):
pass
def set... | 23 | 3 | 9 | 0 | 8 | 1 | 2 | 0.24 | 0 | 10 | 3 | 0 | 17 | 7 | 18 | 18 | 234 | 31 | 165 | 48 | 137 | 40 | 126 | 38 | 107 | 4 | 0 | 2 | 34 |
327,687 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/device.py | wave_lang.runtime.device.DeviceState | import torch
from typing import Any, Callable, Dict, Optional, Union
from iree.runtime import BufferUsage, ExternalTimepointFlags, HalBufferView, HalDevice, HalDriver, HalExternalTimepoint, MemoryType, SemaphoreCompatibility, VmInstance, VmModule, create_hal_module, get_driver
from functools import lru_cache
class Dev... |
class DeviceState:
'''State for an instantiated HAL device.
Note that the IREE runtime internally manages a global cache of drivers for
standard named-access (not custom-constructed) drivers.
'''
def __init__(self, *, driver: Union[str, HalDriver], device: Optional[HalDevice]=None, vm_instance: Op... | 11 | 1 | 7 | 0 | 7 | 0 | 2 | 0.08 | 0 | 5 | 0 | 0 | 4 | 7 | 5 | 5 | 62 | 7 | 51 | 32 | 30 | 4 | 28 | 15 | 22 | 3 | 0 | 1 | 10 |
327,688 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/device.py | wave_lang.runtime.device.MismatchedDeviceSetClearError | class MismatchedDeviceSetClearError(AssertionError):
def __init__(self):
super().__init__('Calls to Device.set()/clear() are mismatched or unbalanced.') | class MismatchedDeviceSetClearError(AssertionError):
def __init__(self):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 12 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 4 | 0 | 1 |
327,689 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/device.py | wave_lang.runtime.device.NoCurrentDeviceError | class NoCurrentDeviceError(Exception):
def __init__(self):
super().__init__("You accessed a method which requires a current device but none was set on this thread. Either pass an explicit 'device=' or set a current device via `with device:`") | class NoCurrentDeviceError(Exception):
def __init__(self):
pass | 2 | 0 | 6 | 0 | 6 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 11 | 7 | 0 | 7 | 2 | 5 | 0 | 3 | 2 | 1 | 1 | 3 | 0 | 1 |
327,690 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/device.py | wave_lang.runtime.device.UnsupportedTorchDeviceError | class UnsupportedTorchDeviceError(Exception):
def __init__(self, torch_device):
super().__init__(f'Attempt to use turbine with a torch.device that is not supported by this build: {torch_device}') | class UnsupportedTorchDeviceError(Exception):
def __init__(self, torch_device):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 11 | 5 | 0 | 5 | 2 | 3 | 0 | 3 | 2 | 1 | 1 | 3 | 0 | 1 |
327,691 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/device.py | wave_lang.runtime.device._CudaSemaphoreInterop | from iree.runtime import BufferUsage, ExternalTimepointFlags, HalBufferView, HalDevice, HalDriver, HalExternalTimepoint, MemoryType, SemaphoreCompatibility, VmInstance, VmModule, create_hal_module, get_driver
import torch
class _CudaSemaphoreInterop:
def __init__(self, sync):
self.sync = sync
pass... |
class _CudaSemaphoreInterop:
def __init__(self, sync):
pass
def get_timepoint_import(self):
pass
def wait_exported_timepoint(self, timepoint: HalExternalTimepoint):
pass
def destroy_timepoint_event(self, timepoint: HalExternalTimepoint):
pass | 5 | 0 | 3 | 0 | 3 | 1 | 1 | 0.18 | 0 | 0 | 0 | 0 | 4 | 1 | 4 | 4 | 16 | 3 | 11 | 6 | 6 | 2 | 11 | 6 | 6 | 1 | 0 | 0 | 4 |
327,692 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/device.py | wave_lang.runtime.device._HipSemaphoreInterop | import torch
import platform
import ctypes
from iree.runtime import BufferUsage, ExternalTimepointFlags, HalBufferView, HalDevice, HalDriver, HalExternalTimepoint, MemoryType, SemaphoreCompatibility, VmInstance, VmModule, create_hal_module, get_driver
class _HipSemaphoreInterop:
def __init__(self, sync):
... |
class _HipSemaphoreInterop:
def __init__(self, sync):
pass
def get_timepoint_import(self):
pass
def wait_exported_timepoint(self, timepoint: HalExternalTimepoint):
pass
def destroy_timepoint_event(self, timepoint: HalExternalTimepoint):
pass | 5 | 0 | 15 | 1 | 14 | 0 | 3 | 0 | 0 | 3 | 0 | 0 | 4 | 2 | 4 | 4 | 65 | 7 | 58 | 12 | 53 | 0 | 44 | 12 | 39 | 4 | 0 | 1 | 12 |
327,693 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/device.py | wave_lang.runtime.device._NullSemaphoreInterop | from iree.runtime import BufferUsage, ExternalTimepointFlags, HalBufferView, HalDevice, HalDriver, HalExternalTimepoint, MemoryType, SemaphoreCompatibility, VmInstance, VmModule, create_hal_module, get_driver
class _NullSemaphoreInterop:
def __init__(self, sync):
self.sync = sync
def get_timepoint_im... |
class _NullSemaphoreInterop:
def __init__(self, sync):
pass
def get_timepoint_import(self):
pass
def wait_exported_timepoint(self, timepoint: HalExternalTimepoint):
pass
def destroy_timepoint_event(self, timepoint: HalExternalTimepoint):
pass | 5 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 4 | 1 | 4 | 4 | 12 | 3 | 9 | 6 | 4 | 0 | 9 | 6 | 4 | 1 | 0 | 0 | 4 |
327,694 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/launch.py | wave_lang.runtime.launch.Launchable | from typing import Any, Callable, Optional, Sequence, Tuple, Union
from torch import Tensor
from iree.runtime import HalBufferView, HalElementType, ParameterProvider, VmContext, VmFunction, VmModule, VmRef, VmVariantList, create_io_parameters_module
from .device import Device, get_device_from_torch
from wave_lang.suppo... |
class Launchable:
'''Facilities for launching a compiled program (VMFB) on an attached device.
Like the eager custom-op executor, this follows the usual PyTorch rules
whereby the device that input tensors reside on dictates where the launch
happens. Unlike that flow, this does not include any notion of... | 14 | 4 | 21 | 1 | 19 | 2 | 4 | 0.15 | 0 | 13 | 1 | 0 | 5 | 5 | 8 | 8 | 222 | 21 | 175 | 74 | 136 | 26 | 103 | 46 | 92 | 18 | 0 | 4 | 35 |
327,695 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/op_reg/base.py | wave_lang.runtime.op_reg.base.AttrArg | from torch import Tensor
from typing import Any, Callable, Optional, Sequence, Type, Union, cast
class AttrArg:
ir_arity: int = 0
maybe_tensor_value: Optional[Tensor] = None
is_list: bool = False
__slots__ = ['v', 'spec_value']
def __init__(self, v: object):
self.v = v
self.spec_va... |
class AttrArg:
def __init__(self, v: object):
pass
def __repr__(self):
pass
def generate_meta(self) -> object:
pass
@property
def spec_key(self) -> str:
'''Generates a key that will be the same for all specializations.'''
pass
@property
def mlir_ty... | 8 | 1 | 3 | 0 | 2 | 0 | 1 | 0.1 | 0 | 4 | 0 | 0 | 5 | 2 | 5 | 5 | 29 | 6 | 21 | 14 | 13 | 2 | 16 | 12 | 10 | 1 | 0 | 0 | 5 |
327,696 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/op_reg/base.py | wave_lang.runtime.op_reg.base.CustomOp | from abc import ABC, abstractmethod
import functools
from typing import Any, Callable, Optional, Sequence, Type, Union, cast
import torch
class CustomOp(ABC):
"""Users subclass this in order to register a wave custom op."""
@staticmethod
def register(op_class: Optional[Type['CustomOp']]=None, *, library: ... |
class CustomOp(ABC):
'''Users subclass this in order to register a wave custom op.'''
@staticmethod
def register(op_class: Optional[Type['CustomOp']]=None, *, library: torch.library.Library=WAVE_LIBRARY, dispatch_key: Union[str, Sequence[str], None]=None, register_meta: bool=True, register_impl: bool=True)... | 14 | 7 | 19 | 3 | 7 | 9 | 1 | 1.09 | 1 | 3 | 0 | 1 | 6 | 4 | 7 | 27 | 145 | 28 | 56 | 33 | 28 | 61 | 25 | 14 | 17 | 2 | 4 | 1 | 9 |
327,697 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/op_reg/base.py | wave_lang.runtime.op_reg.base.EagerKernelSelection | from torch import Tensor
from typing import Any, Callable, Optional, Sequence, Type, Union, cast
class EagerKernelSelection(KernelSelection):
"""Kernel selection specialized for eager arguments."""
__slots__ = ['args']
def __init__(self, op: CustomOp, args: list[Any]):
super().__init__(op, len(arg... |
class EagerKernelSelection(KernelSelection):
'''Kernel selection specialized for eager arguments.'''
def __init__(self, op: CustomOp, args: list[Any]):
pass
def arg_tensor(self, arg: int, *, inplace_tied: bool=False) -> 'TensorArg':
pass
def arg_optional_tensor(self, arg: int) -> Opt... | 12 | 1 | 10 | 0 | 9 | 0 | 1 | 0.05 | 1 | 13 | 6 | 0 | 11 | 1 | 11 | 47 | 122 | 12 | 105 | 40 | 93 | 5 | 78 | 32 | 66 | 3 | 5 | 2 | 16 |
327,698 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/op_reg/base.py | wave_lang.runtime.op_reg.base.EmptyOptionalTensorArg | from torch import Tensor
from typing import Any, Callable, Optional, Sequence, Type, Union, cast
class EmptyOptionalTensorArg:
"""Sentinel type marking an optional tensor argument that was not provided
at the call site.
To `KernelSelection` a `None` `ArgDescriptor` indicates an argument has been
decla... |
class EmptyOptionalTensorArg:
'''Sentinel type marking an optional tensor argument that was not provided
at the call site.
To `KernelSelection` a `None` `ArgDescriptor` indicates an argument has been
declared as part of the signature, but the `ArgDescriptor` hasn't been
initialized with values an a... | 7 | 1 | 2 | 0 | 2 | 0 | 1 | 0.57 | 0 | 2 | 0 | 0 | 4 | 0 | 4 | 4 | 28 | 6 | 14 | 10 | 7 | 8 | 12 | 8 | 7 | 1 | 0 | 0 | 4 |
327,699 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/wave_lang/runtime/op_reg/base.py | wave_lang.runtime.op_reg.base.FreeFuncKernelBuilder | from typing import Any, Callable, Optional, Sequence, Type, Union, cast
from wave_lang.support.ir_imports import Block, Context, FunctionType, IndexType, InsertionPoint, IntegerAttr, IrType, Location, StringAttr, SymbolTable, Value, arith_d, builtin_d, func_d
class FreeFuncKernelBuilder(KernelBuilder):
"""Kernel b... |
class FreeFuncKernelBuilder(KernelBuilder):
'''Kernel builder that emits the body of the kernel into a free function.
This is intended to be used when compiling a standalone module that will
be directly invoked by the runtime. Further variants exist that generate
into a func but also emit a call into a... | 5 | 3 | 34 | 1 | 31 | 2 | 5 | 0.12 | 1 | 7 | 1 | 0 | 2 | 2 | 3 | 27 | 114 | 8 | 95 | 37 | 76 | 11 | 58 | 22 | 54 | 13 | 5 | 4 | 16 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.