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,500 | 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/_support/location_config.py | location_config.LocationCaptureLevel | from enum import Enum
class LocationCaptureLevel(Enum):
NONE = 0
FILE_LINE_COL = 1
STACK_TRACE = 2
STACK_TRACE_WITH_SYSTEM = 3 |
class LocationCaptureLevel(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
327,501 | 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/transforms/merger.py | merger.Merger | from typing import Dict, List, Optional, Sequence
from iree.compiler.ir import Attribute, InsertionPoint, Operation, StringAttr, SymbolTable
class Merger:
"""Merges the contents of one module into another module.
This performs an opinionated merge that:
* Applies a heuristic to determine whether to merg... |
class Merger:
'''Merges the contents of one module into another module.
This performs an opinionated merge that:
* Applies a heuristic to determine whether to merge/rename a global or
keep the existing.
* Moves functions to the target, renaming on collision.
* Moves initializers to th... | 7 | 3 | 24 | 2 | 20 | 2 | 5 | 0.23 | 0 | 3 | 0 | 0 | 6 | 13 | 6 | 6 | 167 | 18 | 121 | 54 | 106 | 28 | 96 | 46 | 89 | 10 | 0 | 2 | 27 |
327,502 | 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/memory_analysis/minimize_shared_allocs.py | minimize_shared_allocs.LiveInterval | from dataclasses import dataclass
@dataclass
class LiveInterval:
start: tuple[int] = (10000,)
end: tuple[int] = (-1,) | @dataclass
class LiveInterval:
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,503 | 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/aot/support/procedural/base.py | procedural.base.AbstractIntrinsic | from wave_lang.support.ir_imports import F32Type, F64Type, IndexType, IntegerType, IrType, Location, RankedTensorType, ShapedType, Value
from typing import Any, Callable, List, Optional
from ..ir_utils import FunctionBuilder, ModuleBuilder
class AbstractIntrinsic:
"""Base class for descriptor types that can be con... |
class AbstractIntrinsic:
'''Base class for descriptor types that can be converted to Python proxies.'''
def create_intrinsic(self, value: Value) -> Intrinsic:
'''Creates a proxy object that can flow through a procedural trace.'''
pass
def get_ir_type(self, builder: ModuleBuilder) -> IrTyp... | 3 | 3 | 3 | 0 | 2 | 1 | 1 | 0.5 | 0 | 3 | 2 | 2 | 2 | 0 | 2 | 2 | 12 | 3 | 6 | 4 | 3 | 3 | 6 | 4 | 3 | 1 | 0 | 0 | 2 |
327,504 | 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/aot/support/procedural/base.py | procedural.base.AbstractScalar | from ..ir_utils import FunctionBuilder, ModuleBuilder
from typing import Any, Callable, List, Optional
from .primitives import IrImmediateScalar, IrImmediateTensor
from wave_lang.support.ir_imports import F32Type, F64Type, IndexType, IntegerType, IrType, Location, RankedTensorType, ShapedType, Value
class AbstractScal... |
class AbstractScalar(AbstractIntrinsic, AbstractTypedef):
'''Represents a scalar value of some type.'''
def __init__(self, label: str, type_producer: Callable[[], IrType]):
pass
def __repr__(self):
pass
def create_intrinsic(self, ir_value: Value) -> Intrinsic:
pass
def g... | 5 | 1 | 3 | 0 | 3 | 0 | 1 | 0.07 | 2 | 4 | 3 | 0 | 4 | 2 | 4 | 7 | 21 | 5 | 15 | 8 | 10 | 1 | 12 | 8 | 7 | 1 | 1 | 1 | 4 |
327,505 | 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/aot/support/procedural/base.py | procedural.base.AbstractTensor | from wave_lang.support.ir_imports import F32Type, F64Type, IndexType, IntegerType, IrType, Location, RankedTensorType, ShapedType, Value
from typing import Any, Callable, List, Optional
from .primitives import IrImmediateScalar, IrImmediateTensor
import torch
from ..ir_utils import FunctionBuilder, ModuleBuilder
class... |
class AbstractTensor(AbstractIntrinsic, AbstractTypedef):
'''Represents a tensor of known rank and dtype.'''
def __init__(self, *size: Optional[int], dtype: torch.dtype=torch.float32):
pass
def __repr__(self):
pass
def create_intrinsic(self, ir_value: Value) -> Intrinsic:
pas... | 5 | 1 | 5 | 0 | 5 | 0 | 1 | 0.04 | 2 | 6 | 3 | 0 | 4 | 2 | 4 | 7 | 29 | 5 | 23 | 10 | 18 | 1 | 14 | 10 | 9 | 2 | 1 | 1 | 5 |
327,506 | 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/aot/support/procedural/base.py | procedural.base.AbstractTypedef | from ..ir_utils import FunctionBuilder, ModuleBuilder
from wave_lang.support.ir_imports import F32Type, F64Type, IndexType, IntegerType, IrType, Location, RankedTensorType, ShapedType, Value
class AbstractTypedef:
"""Base class for instances which declare some form of public arg/result type definition."""
def... |
class AbstractTypedef:
'''Base class for instances which declare some form of public arg/result type definition.'''
def get_ir_type(self, builder: ModuleBuilder) -> IrType:
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.33 | 0 | 2 | 1 | 2 | 1 | 0 | 1 | 1 | 5 | 1 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 0 | 1 |
327,507 | 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/aot/support/procedural/base.py | procedural.base.Abstractifiable | class Abstractifiable:
"""Indicates that a type knows how to abstractify itself."""
def abstractify(self) -> AbstractTypedef:
raise NotImplementedError | class Abstractifiable:
'''Indicates that a type knows how to abstractify itself.'''
def abstractify(self) -> AbstractTypedef:
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.33 | 0 | 2 | 1 | 2 | 1 | 0 | 1 | 1 | 5 | 1 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 0 | 1 |
327,508 | 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/aot/support/procedural/base.py | procedural.base.CallableIntrinsic | class CallableIntrinsic(Intrinsic):
"""Intrinsic subclass that supports calls.
This is separate so as to make error handling better (i.e. does not support
calls) for intrinsics that are not callable.
"""
__slots__ = []
def __call__(self, *args, **kwargs):
return current_ir_trace().hand... | class CallableIntrinsic(Intrinsic):
'''Intrinsic subclass that supports calls.
This is separate so as to make error handling better (i.e. does not support
calls) for intrinsics that are not callable.
'''
def __call__(self, *args, **kwargs):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 1 | 1 | 0 | 0 | 2 | 1 | 0 | 1 | 6 | 11 | 3 | 4 | 3 | 2 | 4 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
327,509 | 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/aot/support/procedural/base.py | procedural.base.Intrinsic | from wave_lang.support.ir_imports import F32Type, F64Type, IndexType, IntegerType, IrType, Location, RankedTensorType, ShapedType, Value
from collections.abc import Sequence
from typing import Any, Callable, List, Optional
class Intrinsic:
"""Objects which interact natively with the tracing system implement this."... |
class Intrinsic:
'''Objects which interact natively with the tracing system implement this.'''
def resolve_ir_values(self, proc_trace: 'IrTrace') -> Sequence[Value]:
pass
def resolve_call(self, proc_trace: 'IrTrace', *args, **kwargs):
pass
def resolve_assignment(self, proc_trace: 'Ir... | 8 | 1 | 4 | 0 | 4 | 0 | 1 | 0.09 | 0 | 2 | 0 | 3 | 5 | 0 | 5 | 5 | 30 | 6 | 22 | 10 | 14 | 2 | 14 | 8 | 8 | 1 | 0 | 0 | 5 |
327,510 | 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/aot/support/procedural/base.py | procedural.base.IrTrace | from ..ir_utils import FunctionBuilder, ModuleBuilder
class IrTrace(FunctionBuilder):
"""Gets callbacks for tracing events."""
__slots__ = []
def finalize(self):
"""Called when the trace is finished (popped off the stack)."""
def handle_call(self, target: 'Intrinsic', args, kwargs):
r... |
class IrTrace(FunctionBuilder):
'''Gets callbacks for tracing events.'''
def finalize(self):
'''Called when the trace is finished (popped off the stack).'''
pass
def handle_call(self, target: 'Intrinsic', args, kwargs):
pass
def handle_assignment(self, scope, target, updated_... | 4 | 2 | 3 | 0 | 2 | 0 | 1 | 0.22 | 1 | 1 | 0 | 1 | 3 | 0 | 3 | 5 | 15 | 4 | 9 | 5 | 5 | 2 | 7 | 5 | 3 | 1 | 1 | 0 | 3 |
327,511 | 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/aot/support/procedural/base.py | procedural.base.ProcedureTraceError | class ProcedureTraceError(Exception):
def __init__(self, message: str):
super().__init__(message) | class ProcedureTraceError(Exception):
def __init__(self, message: str):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 1 | 0 | 1 | 11 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 3 | 0 | 1 |
327,512 | 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/aot/support/procedural/base.py | procedural.base.TreeAbstractifiable | from typing import Any, Callable, List, Optional
class TreeAbstractifiable:
"""Indicates that a type decomposes into a tree that can be abstractified."""
def abstractify_tree(self) -> Any:
raise NotImplementedError |
class TreeAbstractifiable:
'''Indicates that a type decomposes into a tree that can be abstractified.'''
def abstractify_tree(self) -> Any:
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.33 | 0 | 2 | 0 | 2 | 1 | 0 | 1 | 1 | 5 | 1 | 3 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 0 | 1 |
327,513 | 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/aot/support/procedural/exported_program.py | procedural.exported_program.AutoGlobalTensorDef | from ..ir_utils import GlobalAttributes, ModuleBuilder, attributes_from_argument_device_affinities, update_func_op_argument_attributes
import torch
from .globals import GlobalsDef, MaterializedGlobal
from torch.utils._pytree import tree_flatten, tree_unflatten
class AutoGlobalTensorDef(GlobalsDef):
"""Global defin... |
class AutoGlobalTensorDef(GlobalsDef):
'''Global definition that is used for arbitrary tensor literals encountered
during processing.
'''
def __init__(self, name: str, value: torch.Tensor, attrs: GlobalAttributes):
pass
def items(self):
pass
def schema(self):
pass | 4 | 1 | 3 | 0 | 3 | 0 | 1 | 0.2 | 1 | 3 | 1 | 0 | 3 | 3 | 3 | 7 | 22 | 4 | 15 | 8 | 11 | 3 | 11 | 8 | 7 | 1 | 1 | 0 | 3 |
327,514 | 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/aot/support/procedural/exported_program.py | procedural.exported_program.ExportedProgramIntrinsic | from wave_lang.support.ir_imports import FlatSymbolRefAttr, FunctionType, IrType, Operation, StringAttr, TypeAttr, Value, func_d, util_d
from typing import Any, Dict, List, Optional
from .tracer import IrTrace
from .base import CallableIntrinsic
from .primitives import IrImmediateTensor, IrTensor
from torch.utils._pytr... |
class ExportedProgramIntrinsic(CallableIntrinsic):
def __init__(self, entry_func_op: Operation, entry_sig: torch.export.ModuleCallSignature, user_output_dtypes: List[Optional[torch.dtype]]):
pass
@property
def function_type(self) -> FunctionType:
pass
@property
def function_symbol(... | 11 | 0 | 13 | 1 | 11 | 1 | 2 | 0.07 | 1 | 8 | 3 | 0 | 7 | 3 | 7 | 13 | 100 | 10 | 84 | 43 | 53 | 6 | 35 | 20 | 27 | 3 | 2 | 1 | 11 |
327,515 | 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/aot/support/procedural/exported_program.py | procedural.exported_program._Hooks | import math
import torch
from wave_lang.support.logging import aot_logger as logger
from ..ir_utils import GlobalAttributes, ModuleBuilder, attributes_from_argument_device_affinities, update_func_op_argument_attributes
from iree.compiler.extras.fx_importer import FxImporter, FxImporterHooks, GraphNodeImporter, InputInf... |
class _Hooks(FxImporterHooks):
def __init__(self, module_builder: ModuleBuilder):
pass
def store_produced_value(self, gni: GraphNodeImporter, py_value: Any, produced_ir_value: Any, info: InputInfo):
pass
def resolve_literal(self, gni: GraphNodeImporter, literal: Any, info: Optional[Input... | 6 | 0 | 21 | 1 | 16 | 4 | 3 | 0.22 | 1 | 9 | 5 | 0 | 5 | 1 | 5 | 5 | 108 | 9 | 83 | 44 | 57 | 18 | 51 | 24 | 45 | 4 | 1 | 1 | 13 |
327,516 | 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/aot/support/procedural/globals.py | procedural.globals.GlobalsDef | from wave_lang.support.logging import aot_logger as logger
from torch.utils._pytree import TreeSpec, tree_unflatten
from ..ir_utils import GlobalAttributes, ModuleBuilder
from .base import AbstractScalar, AbstractTensor, IrTrace, current_ir_trace
from collections.abc import Generator, Sequence
import torch
from typing ... |
class GlobalsDef:
'''Base class for all exporting descriptors.'''
def __init__(self, attrs: GlobalAttributes):
pass
def items(self) -> Generator[Tuple[str, Any], None, None]:
'''Yields tuples of name/value exports.'''
pass
def schema(self) -> TreeSpec:
'''A schema use... | 5 | 4 | 24 | 0 | 22 | 1 | 3 | 0.05 | 0 | 13 | 8 | 5 | 4 | 1 | 4 | 4 | 104 | 6 | 93 | 15 | 88 | 5 | 38 | 13 | 33 | 7 | 0 | 3 | 10 |
327,517 | 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/aot/support/procedural/globals.py | procedural.globals.IrGlobalScalar | from .primitives import IrScalar, IrTensor
from collections.abc import Generator, Sequence
from wave_lang.support.ir_imports import IrType, Operation, Value, util_d
from .base import AbstractScalar, AbstractTensor, IrTrace, current_ir_trace
class IrGlobalScalar(IrScalar, MaterializedGlobal):
"""An IrScalar that is... |
class IrGlobalScalar(IrScalar, MaterializedGlobal):
'''An IrScalar that is loaded from a global and associated with its aggregate.'''
def __init__(self, export_name: str, info: GlobalsDef, *, symbol_name: str, global_op: Operation, global_type: IrType):
pass
def resolve_ir_values(self, trace: IrT... | 6 | 1 | 7 | 0 | 7 | 0 | 1 | 0.02 | 2 | 7 | 2 | 0 | 5 | 4 | 5 | 13 | 52 | 6 | 45 | 22 | 31 | 1 | 25 | 14 | 19 | 3 | 2 | 1 | 7 |
327,518 | 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/aot/support/procedural/globals.py | procedural.globals.IrGlobalTensor | import torch
from .base import AbstractScalar, AbstractTensor, IrTrace, current_ir_trace
from .primitives import IrScalar, IrTensor
from wave_lang.support.ir_imports import IrType, Operation, Value, util_d
from collections.abc import Generator, Sequence
class IrGlobalTensor(IrTensor, MaterializedGlobal):
"""An IrS... |
class IrGlobalTensor(IrTensor, MaterializedGlobal):
'''An IrScalar that is loaded from a global and associated with its aggregate.'''
def __init__(self, export_name: str, info: GlobalsDef, *, symbol_name: str, global_op: Operation, global_type: IrType, dtype: torch.dtype):
pass
def resolve_ir_val... | 5 | 1 | 8 | 0 | 8 | 0 | 2 | 0.03 | 2 | 7 | 2 | 0 | 4 | 4 | 4 | 15 | 46 | 5 | 40 | 21 | 26 | 1 | 22 | 12 | 17 | 3 | 2 | 1 | 6 |
327,519 | 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/aot/support/procedural/globals.py | procedural.globals.LiveGlobalCollectionProxy | from .base import AbstractScalar, AbstractTensor, IrTrace, current_ir_trace
class LiveGlobalCollectionProxy:
"""Proxy object around a collection which knows how to redirect setitem."""
__slots__ = ['_raw_collection']
def __init__(self, raw_collection):
self._raw_collection = raw_collection
de... |
class LiveGlobalCollectionProxy:
'''Proxy object around a collection which knows how to redirect setitem.'''
def __init__(self, raw_collection):
pass
def __getitem__(self, key: str):
pass
def __setitem__(self, key, value):
pass
def __len__(self):
pass
def __... | 6 | 1 | 4 | 0 | 4 | 0 | 1 | 0.05 | 0 | 3 | 1 | 0 | 5 | 1 | 5 | 5 | 28 | 6 | 21 | 10 | 15 | 1 | 18 | 10 | 12 | 2 | 0 | 1 | 7 |
327,520 | 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/aot/support/procedural/globals.py | procedural.globals.MaterializedGlobal | from wave_lang.support.ir_imports import IrType, Operation, Value, util_d
class MaterializedGlobal:
"""Tags an Ir* that is duck-typed as a global."""
ir_type: IrType
symbol_name: str
global_op: Operation
global_type: IrType |
class MaterializedGlobal:
'''Tags an Ir* that is duck-typed as a global.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.2 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 7 | 1 | 5 | 1 | 4 | 1 | 5 | 1 | 4 | 0 | 0 | 0 | 0 |
327,521 | 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/aot/support/procedural/iree_emitter.py | procedural.iree_emitter.IREEEmitter | from typing import Any, Dict, List, Optional, Tuple, Union
import torch
from .base import Intrinsic, ShapedTypeDynamicSizeSentinel, current_ir_trace
from .primitives import IrImmediateScalar, IrImmediateTensor, IrScalar, IrTensor
from wave_lang.support.conversions import TORCH_DTYPE_TO_IREE_TYPE
from wave_lang.support.... |
class IREEEmitter:
@emitter
def tensor_dim(self, source: BuildableTensorType, index: int, *, dtype: Optional[torch.dtype]=None) -> 'IrScalar':
'''Gets the dimension size of a tensor at a static position.'''
pass
@emitter
def tensor_empty(self, *dims: BuildableTensorDimDecl, dtype: torc... | 15 | 4 | 26 | 1 | 23 | 4 | 3 | 0.15 | 0 | 9 | 3 | 0 | 7 | 0 | 7 | 7 | 199 | 10 | 168 | 80 | 125 | 25 | 100 | 45 | 92 | 8 | 0 | 3 | 19 |
327,522 | 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/aot/support/procedural/primitives.py | procedural.primitives.IrImmediateScalar | from .base import Intrinsic, IrTrace, current_ir_trace
from wave_lang.support.ir_imports import F32Type, IrType, RankedTensorType, Value, arith_d
from collections.abc import Sequence
class IrImmediateScalar(IrScalar):
"""Represents an IR scalar value."""
__slots__ = ['_ir_value']
def __init__(self, ir_val... |
class IrImmediateScalar(IrScalar):
'''Represents an IR scalar value.'''
def __init__(self, ir_value: Value):
pass
def resolve_ir_values(self, proc_trace: IrTrace) -> Sequence[Value]:
pass | 3 | 1 | 3 | 0 | 3 | 0 | 1 | 0.1 | 1 | 3 | 1 | 0 | 2 | 1 | 2 | 10 | 14 | 3 | 10 | 5 | 7 | 1 | 8 | 5 | 5 | 1 | 2 | 0 | 2 |
327,523 | 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/aot/support/procedural/primitives.py | procedural.primitives.IrImmediateTensor | import torch
from collections.abc import Sequence
from .base import Intrinsic, IrTrace, current_ir_trace
from wave_lang.support.ir_imports import F32Type, IrType, RankedTensorType, Value, arith_d
class IrImmediateTensor(IrTensor):
"""Represents a Value in the IR under construction during procedural tracing."""
... |
class IrImmediateTensor(IrTensor):
'''Represents a Value in the IR under construction during procedural tracing.'''
def __init__(self, ir_value: Value, dtype: torch.dtype):
pass
def __repr__(self):
pass
def resolve_ir_values(self, proc_trace: IrTrace) -> Sequence[Value]:
pass | 4 | 1 | 2 | 0 | 2 | 0 | 1 | 0.09 | 1 | 3 | 1 | 0 | 3 | 1 | 3 | 14 | 16 | 4 | 11 | 6 | 7 | 1 | 9 | 6 | 5 | 1 | 2 | 0 | 3 |
327,524 | 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/aot/support/procedural/primitives.py | procedural.primitives.IrScalar | from ..ir_utils import _is_float_type, _is_integer_like_type, build_tensor_dim_value
from .base import Intrinsic, IrTrace, current_ir_trace
from wave_lang.support.ir_imports import F32Type, IrType, RankedTensorType, Value, arith_d
class IrScalar(Intrinsic):
"""An intrinsic that represents a scalar value.
Subc... |
class IrScalar(Intrinsic):
'''An intrinsic that represents a scalar value.
Subclasses are responsible for providing either value or load semantics.
'''
def __init__(self, ir_type: IrType):
pass
def set(self, other):
pass
def __add__(self, other):
pass | 4 | 1 | 17 | 1 | 13 | 3 | 4 | 0.31 | 1 | 6 | 1 | 2 | 3 | 1 | 3 | 8 | 62 | 7 | 42 | 12 | 38 | 13 | 31 | 12 | 27 | 7 | 1 | 2 | 12 |
327,525 | 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/aot/support/procedural/primitives.py | procedural.primitives.IrTensor | from collections.abc import Sequence
from .base import Intrinsic, IrTrace, current_ir_trace
from ..ir_utils import _is_float_type, _is_integer_like_type, build_tensor_dim_value
from typing import Dict, List, Optional
from wave_lang.support.ir_imports import F32Type, IrType, RankedTensorType, Value, arith_d
import torch... |
class IrTensor(Intrinsic):
'''An intrinsic that represents a tensor value.
Carries additional metadata needed to resolve dimensions and original
PyTorch attributes.
'''
def __init__(self, ir_type: IrType, dtype: torch.dtype):
pass
@property
def rank(self) -> int:
pass
... | 9 | 4 | 10 | 1 | 7 | 3 | 2 | 0.35 | 1 | 2 | 0 | 2 | 5 | 5 | 6 | 11 | 84 | 11 | 54 | 26 | 39 | 19 | 32 | 18 | 25 | 3 | 1 | 1 | 9 |
327,526 | 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/aot/support/procedural/tracer.py | procedural.tracer.ProcedureTrace | from wave_lang.support.ir_imports import DictAttr, Location, StringAttr, Value, func_d
from .base import AbstractIntrinsic, Intrinsic, IrTrace, ProcedureTraceError, new_ir_trace_scope
from typing import Any, Callable, List
from torch.utils._pytree import tree_flatten, tree_unflatten, treespec_dumps
from ..ir_utils impo... |
class ProcedureTrace(IrTrace):
'''Captures execution of a Python func into IR.'''
def __init__(self, *, module_builder: ModuleBuilder, func_op: func_d.FuncOp, proxy_posargs, proxy_kwargs):
pass
@staticmethod
def define_func(module_builder: ModuleBuilder, *, symbol_name: str, posargs: Sequence,... | 8 | 2 | 25 | 2 | 22 | 2 | 4 | 0.09 | 1 | 15 | 5 | 0 | 5 | 2 | 6 | 11 | 166 | 17 | 137 | 46 | 114 | 12 | 73 | 29 | 66 | 12 | 2 | 3 | 23 |
327,527 | 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/_support/regions.py | regions.RegionGraph | import contextlib
import torch.fx as fx
from .location_config import LocationCaptureConfig
from typing import Dict, List, Optional, Tuple
class RegionGraph:
def __init__(self, *, location_capture_config: Optional[LocationCaptureConfig]=None):
self.tracers: List['SubgraphTracer'] = []
self.subgraph... |
class RegionGraph:
def __init__(self, *, location_capture_config: Optional[LocationCaptureConfig]=None):
pass
@property
def root_tracer(self) -> 'SubgraphTracer':
pass
@property
def current_tracer(self) -> 'SubgraphTracer':
pass
def create_proxy(self, *args, **kwargs):... | 14 | 0 | 5 | 0 | 5 | 0 | 2 | 0.06 | 0 | 3 | 1 | 1 | 10 | 4 | 10 | 10 | 66 | 9 | 54 | 29 | 35 | 3 | 41 | 20 | 30 | 3 | 0 | 2 | 15 |
327,528 | 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/_support/regions.py | regions.SubgraphTracer | from typing import Dict, List, Optional, Tuple
import torch.utils._pytree as pytree
import torch.fx as fx
class SubgraphTracer(fx.Tracer):
def __init__(self, region_graph: RegionGraph, parent: Optional['SubgraphTracer']=None):
super().__init__()
self.graph = fx.Graph()
self.region_graph = ... |
class SubgraphTracer(fx.Tracer):
def __init__(self, region_graph: RegionGraph, parent: Optional['SubgraphTracer']=None):
pass
def trace(self, *args, **kwargs) -> Tuple[str, List[fx.Proxy]]:
pass
def _create_graph_input(self, node: fx.Node, name: str, type_expr=None) -> fx.Proxy:
... | 7 | 1 | 13 | 1 | 11 | 2 | 2 | 0.14 | 1 | 4 | 1 | 1 | 6 | 4 | 6 | 6 | 83 | 10 | 64 | 33 | 46 | 9 | 41 | 22 | 34 | 3 | 1 | 2 | 12 |
327,529 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/setup.py | setup.BuildCommand | import distutils.command.build
class BuildCommand(distutils.command.build.build):
def initialize_options(self):
distutils.command.build.build.initialize_options(self)
self.build_base = '_python_build' |
class BuildCommand(distutils.command.build.build):
def initialize_options(self):
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 1 | 1 | 38 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 2 | 0 | 1 |
327,530 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/setup.py | setup.CMakeBuild | import sys
import subprocess
from pathlib import Path
from setuptools.command.build_ext import build_ext
import os
class CMakeBuild(build_ext):
def run(self):
for ext in self.extensions:
self.build_cmake(ext)
def build_cmake(self, ext):
build_dir = os.path.abspath(os.path.join(sel... |
class CMakeBuild(build_ext):
def run(self):
pass
def build_cmake(self, ext):
pass | 3 | 0 | 17 | 3 | 11 | 3 | 3 | 0.26 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 71 | 35 | 6 | 23 | 8 | 20 | 6 | 14 | 8 | 11 | 3 | 3 | 1 | 5 |
327,531 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/setup.py | setup.CMakeExtension | from setuptools import Extension, find_namespace_packages, setup
from pathlib import Path
import os
class CMakeExtension(Extension):
def __init__(self, name: str, sourcedir: str='') -> None:
super().__init__(name, sources=[])
self.sourcedir = os.fspath(Path(sourcedir).resolve()) |
class CMakeExtension(Extension):
def __init__(self, name: str, sourcedir: str='') -> None:
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 3 | 0 | 0 | 1 | 1 | 1 | 1 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 1 | 0 | 1 |
327,532 | 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/_support/shaped_type.py | shaped_type.ShapedDataType | from typing import Optional, Type, TypeVar, cast
from .dtype import DataType
class ShapedDataType(ShapedType):
"""A shaped type containing data of a specific element type.
This lets us specialize with symbolic shape information.
"""
dtype: Optional[DataType] = None
def __new__(mcls, name: str, ba... |
class ShapedDataType(ShapedType):
'''A shaped type containing data of a specific element type.
This lets us specialize with symbolic shape information.
'''
def __new__(mcls, name: str, bases, dct):
pass
def new_shaped_data_subtype(cls: Type[SubtypeT], *, symbolic_shape: SymbolicShapeExpr,... | 8 | 1 | 9 | 1 | 8 | 0 | 1 | 0.06 | 1 | 3 | 2 | 1 | 6 | 0 | 6 | 23 | 64 | 13 | 48 | 27 | 30 | 3 | 26 | 17 | 18 | 2 | 3 | 1 | 7 |
327,533 | 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/_support/shaped_type.py | shaped_type.ShapedType | from typing import Optional, Type, TypeVar, cast
class ShapedType(type):
"""A shaped type.
This lets us specialize with symbolic shape information.
"""
symbolic_shape: Optional[SymbolicShapeExpr] = None
rank: Optional[int]
def __new__(mcls, name: str, bases, dct):
symbolic_shape = dct... |
class ShapedType(type):
'''A shaped type.
This lets us specialize with symbolic shape information.
'''
def __new__(mcls, name: str, bases, dct):
pass
def new_shaped_subtype(cls: Type[SubtypeT], *, symbolic_shape: SymbolicShapeExpr) -> Type[SubtypeT]:
pass
class Subtype(cl... | 6 | 1 | 8 | 1 | 7 | 0 | 2 | 0.14 | 1 | 2 | 1 | 3 | 4 | 0 | 4 | 17 | 44 | 11 | 29 | 17 | 19 | 4 | 23 | 13 | 17 | 3 | 2 | 1 | 6 |
327,534 | iree-org/wave | /Users/umroot/Documents/PhD_works/PhD-Core-Contents/Class-level-dataset-curation/unseen_data/git_repos_for_analysis/iree-org_wave/lit_tests/kernel/wave/sharktank_integration.py | sharktank_integration.WaveBhsdFlashAttentionSharktankOp | from iree.compiler.ir import Context, MLIRError, Module, Operation, RankedTensorType
from wave_lang.kernel.wave.utils.run_utils import set_default_run_config
from wave_lang.kernel.wave.compile import WaveCompileOptions, wave_compile
from wave_lang.kernel.wave.templates.attention_common import AttentionShape
from wave_l... | @CustomOp.register()
class WaveBhsdFlashAttentionSharktankOp(CustomOp):
def select(self, ksel: KernelSelection):
pass
def generate(self, ksel: KernelSelection, kb: KernelBuilder):
pass | 4 | 0 | 99 | 15 | 80 | 6 | 3 | 0.07 | 1 | 12 | 7 | 0 | 2 | 0 | 2 | 29 | 202 | 32 | 162 | 54 | 159 | 12 | 76 | 50 | 73 | 4 | 5 | 2 | 6 |
327,535 | 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/tuner/tune_attention.py | tune_attention.AttentionConfig | from typing import Dict, List, Optional, Tuple
from dataclasses import asdict, dataclass
from wave_lang.kernel.wave.scheduling.schedule import SchedulingType
from wave_lang.kernel.wave.constraints import MMAType
@dataclass
class AttentionConfig:
"""Configuration for attention kernel tuning."""
batch_size: int
... | @dataclass
class AttentionConfig:
'''Configuration for attention kernel tuning.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.08 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 1 | 13 | 6 | 12 | 1 | 13 | 6 | 12 | 0 | 0 | 0 | 0 |
327,536 | 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/tuner/tune_attention.py | tune_attention.TimingResult | from typing import Dict, List, Optional, Tuple
from dataclasses import asdict, dataclass
@dataclass
class TimingResult:
"""Results from timing a kernel execution."""
latency_ms: float
throughput_tflops: float
trace_file: Optional[str] = None | @dataclass
class TimingResult:
'''Results from timing a kernel execution.'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 0.25 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 1 | 4 | 2 | 3 | 1 | 4 | 2 | 3 | 0 | 0 | 0 | 0 |
327,537 | 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/tuner/tune_attention.py | tune_attention.TuningLogger | import numpy as np
import json
import torch.fx as fx
from typing import Dict, List, Optional, Tuple
import logging
from wave_lang.kernel.wave.tuner.utils import enum_to_str, format_latency_us, latency_to_us
from pathlib import Path
class TuningLogger:
"""Custom logger for the optimization process."""
def __in... |
class TuningLogger:
'''Custom logger for the optimization process.'''
def __init__(self, logger: logging.Logger, schedules_dir: Path):
pass
def set_schedule_params(self, graph: fx.Graph, initiation_interval: int, num_stages: int, resource_reservations: Optional[np.ndarray]=None, resource_names: O... | 5 | 4 | 25 | 2 | 19 | 5 | 1 | 0.28 | 0 | 7 | 0 | 0 | 4 | 12 | 4 | 4 | 107 | 10 | 76 | 30 | 61 | 21 | 39 | 19 | 34 | 2 | 0 | 1 | 5 |
327,538 | 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/perf/utils.py | utils.BaseBenchmark | import argparse
class BaseBenchmark:
"""Base parser class for benchmarking kernels."""
def __init__(self, description: str='Benchmarking CLI for Wave kernels', epilog: str='', formatter_class=argparse.RawTextHelpFormatter):
self.parser = argparse.ArgumentParser(description=description, epilog=epilog, ... |
class BaseBenchmark:
'''Base parser class for benchmarking kernels.'''
def __init__(self, description: str='Benchmarking CLI for Wave kernels', epilog: str='', formatter_class=argparse.RawTextHelpFormatter):
pass
def _add_common_args(self) -> None:
pass
def parse(self):
pass | 4 | 1 | 11 | 0 | 11 | 0 | 1 | 0.03 | 0 | 4 | 0 | 2 | 3 | 1 | 3 | 3 | 38 | 3 | 34 | 10 | 25 | 1 | 11 | 5 | 7 | 1 | 0 | 0 | 3 |
327,539 | 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/aot/builtins/globals.py | wave_lang.aot.builtins.globals.export_buffers | from torch.utils._pytree import TreeSpec, tree_flatten, tree_map
from typing import Any, Optional
from ..support.ir_utils import GlobalAttributes, NameMapCallback
from torch import nn
from ..support.procedural import Abstractifiable, AbstractTypedef, GlobalsDef, TreeAbstractifiable, abstractify_single_value
class expo... |
class export_buffers(GlobalsDef, TreeAbstractifiable):
'''Exports buffers from an nn.Module.
These are exposed to procedural programs as a dictionary of param/values.
'''
def __init__(self, nn_module: nn.Module, *, mutable: Optional[bool]=None, external: Optional[bool]=None, external_scope: Optional[s... | 7 | 1 | 6 | 0 | 6 | 0 | 1 | 0.07 | 2 | 6 | 1 | 0 | 6 | 3 | 6 | 11 | 52 | 8 | 41 | 23 | 24 | 3 | 21 | 13 | 14 | 2 | 1 | 1 | 8 |
327,540 | 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/aot/builtins/globals.py | wave_lang.aot.builtins.globals.export_global | from torch.utils._pytree import TreeSpec, tree_flatten, tree_map
from typing import Any, Optional
from ..support.procedural import Abstractifiable, AbstractTypedef, GlobalsDef, TreeAbstractifiable, abstractify_single_value
from ..support.ir_utils import GlobalAttributes, NameMapCallback
class export_global(GlobalsDef,... |
class export_global(GlobalsDef, Abstractifiable):
'''Exports a single global into a CompiledModule.'''
def __init__(self, value: Any, *, name: str='global', mutable: Optional[bool]=None, external: Optional[bool]=None, external_scope: Optional[str]=None, name_mapper: Optional[NameMapCallback]=None, uninitializ... | 5 | 1 | 8 | 0 | 8 | 0 | 1 | 0.03 | 2 | 6 | 2 | 0 | 4 | 3 | 4 | 9 | 38 | 5 | 32 | 20 | 16 | 1 | 15 | 9 | 10 | 2 | 1 | 1 | 5 |
327,541 | 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/aot/builtins/globals.py | wave_lang.aot.builtins.globals.export_global_tree | from torch.utils._pytree import TreeSpec, tree_flatten, tree_map
from typing import Any, Optional
from ..support.ir_utils import GlobalAttributes, NameMapCallback
from ..support.procedural import Abstractifiable, AbstractTypedef, GlobalsDef, TreeAbstractifiable, abstractify_single_value
class export_global_tree(Global... |
class export_global_tree(GlobalsDef, Abstractifiable):
'''Exports a tree of globals into a CompiledModule.'''
def __init__(self, tree, *, mutable: Optional[bool]=None, external: Optional[bool]=None, external_scope: Optional[str]=None, name_mapper: Optional[NameMapCallback]=None, uninitialized: Optional[bool]=... | 5 | 1 | 8 | 0 | 8 | 0 | 2 | 0.03 | 2 | 6 | 2 | 0 | 4 | 4 | 4 | 9 | 39 | 4 | 34 | 19 | 19 | 1 | 16 | 9 | 11 | 2 | 1 | 1 | 6 |
327,542 | 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/aot/builtins/globals.py | wave_lang.aot.builtins.globals.export_parameters | from ..support.ir_utils import GlobalAttributes, NameMapCallback
from torch import nn
from typing import Any, Optional
from ..support.procedural import Abstractifiable, AbstractTypedef, GlobalsDef, TreeAbstractifiable, abstractify_single_value
from torch.utils._pytree import TreeSpec, tree_flatten, tree_map
class expo... |
class export_parameters(GlobalsDef, TreeAbstractifiable):
'''Exports parameters from an nn.Module.
These are exposed to procedural programs as a dictionary of param/values.
'''
def __init__(self, nn_module: nn.Module, *, mutable: Optional[bool]=None, external: Optional[bool]=None, external_scope: Opti... | 7 | 1 | 6 | 0 | 6 | 0 | 1 | 0.07 | 2 | 6 | 1 | 0 | 6 | 3 | 6 | 11 | 52 | 8 | 41 | 23 | 24 | 3 | 21 | 13 | 14 | 2 | 1 | 1 | 8 |
327,543 | 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/aot/builtins/jittable.py | wave_lang.aot.builtins.jittable._Hooks | from wave_lang.support.ir_imports import FlatSymbolRefAttr, FunctionType, Operation, StringAttr, SymbolTable, TypeAttr, Value, func_d, util_d
from ..support.procedural import CallableIntrinsic, IrImmediateTensor, IrTensor, IrTrace, MaterializedGlobal
from iree.compiler.extras.fx_importer import FxImporter, FxImporterHo... |
class _Hooks(FxImporterHooks):
def __init__(self, module_builder: ModuleBuilder):
pass
def resolve_literal(self, gni: GraphNodeImporter, literal: Any, info: Optional[InputInfo]=None) -> Optional[Value]:
pass | 3 | 0 | 26 | 3 | 16 | 8 | 3 | 0.43 | 1 | 5 | 2 | 0 | 2 | 2 | 2 | 2 | 59 | 7 | 37 | 18 | 29 | 16 | 22 | 13 | 19 | 4 | 1 | 1 | 5 |
327,544 | 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/aot/builtins/jittable.py | wave_lang.aot.builtins.jittable._Merger | from wave_lang.support.ir_imports import FlatSymbolRefAttr, FunctionType, Operation, StringAttr, SymbolTable, TypeAttr, Value, func_d, util_d
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, Union
from ..support.ir_utils import ModuleBuilder
class _Merger:
__slots__ = ['context', 'from_module_op... |
class _Merger:
def __init__(self, to_module_builder: ModuleBuilder, from_module_op: Operation, from_symbol_table: SymbolTable, import_function_name: str):
pass
def merge(self) -> Optional[Operation]:
pass
def import_symbol_op(self, symbol_op):
pass
def _rename(self, from_sym... | 6 | 0 | 13 | 1 | 11 | 1 | 2 | 0.09 | 0 | 2 | 1 | 0 | 5 | 9 | 5 | 5 | 83 | 10 | 67 | 34 | 55 | 6 | 50 | 28 | 44 | 5 | 0 | 2 | 12 |
327,545 | 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/aot/builtins/jittable.py | wave_lang.aot.builtins.jittable.jittable | from ..support.procedural import CallableIntrinsic, IrImmediateTensor, IrTensor, IrTrace, MaterializedGlobal
from wave_lang.support.logging import aot_logger as logger
from ..decompositions import current_aot_decompositions
from iree.compiler.extras.fx_importer import FxImporter, FxImporterHooks, GraphNodeImporter, Inp... | null | 6 | 1 | 35 | 4 | 24 | 8 | 3 | 0.36 | 1 | 12 | 5 | 0 | 4 | 5 | 4 | 10 | 190 | 25 | 123 | 52 | 102 | 44 | 68 | 37 | 62 | 6 | 2 | 2 | 15 |
327,546 | 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/aot/compiled_module.py | wave_lang.aot.compiled_module.CompiledModule | from pathlib import Path
import sys
from typing import Any, Callable, Dict, Optional, Tuple, Union
from .tensor_traits import DeviceAffinity
from . import builtins
from .support.ir_utils import ModuleBuilder, ModuleBuilderOptions
from .support.procedural.exported_program import import_exported_program
from wave_lang.su... | null | 27 | 6 | 16 | 1 | 13 | 2 | 2 | 0.2 | 1 | 19 | 10 | 0 | 3 | 0 | 13 | 28 | 258 | 33 | 188 | 76 | 138 | 38 | 117 | 42 | 100 | 11 | 3 | 2 | 39 |
327,547 | 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/aot/compiled_module.py | wave_lang.aot.compiled_module.CompiledModuleClassInfo | from torch.export import ExportedProgram
import logging
from typing import Any, Callable, Dict, Optional, Tuple, Union
from .support.procedural import GlobalsDef, ProcedureTrace, current_ir_trace
from .support.ir_utils import ModuleBuilder, ModuleBuilderOptions
import inspect
from collections.abc import Generator
from ... |
class CompiledModuleClassInfo:
def __init__(self, *, ir_module_name: str, options: ModuleBuilderOptions):
pass
def add_export(self, key: str, value: Exportable):
pass
@property
def export_procs(self) -> Generator[Tuple[str, ExportProcDef], None, None]:
pass
@property
d... | 13 | 0 | 19 | 1 | 16 | 2 | 3 | 0.12 | 0 | 17 | 8 | 0 | 8 | 3 | 8 | 8 | 171 | 17 | 141 | 33 | 121 | 17 | 79 | 22 | 70 | 13 | 0 | 2 | 26 |
327,548 | 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/aot/compiled_module.py | wave_lang.aot.compiled_module.CompiledModuleInstanceInfo | from .support.ir_utils import ModuleBuilder, ModuleBuilderOptions
from typing import Any, Callable, Dict, Optional, Tuple, Union
class CompiledModuleInstanceInfo:
"""Info class for compiled module instances."""
__slots__ = ['class_info', 'current_import_phase', 'module_builder', 'shadow_dict']
def __init_... |
class CompiledModuleInstanceInfo:
'''Info class for compiled module instances.'''
def __init__(self, class_info: CompiledModuleClassInfo, module_builder: ModuleBuilder):
pass | 2 | 1 | 11 | 0 | 9 | 2 | 1 | 0.19 | 0 | 6 | 3 | 0 | 1 | 4 | 1 | 1 | 21 | 2 | 16 | 11 | 10 | 3 | 7 | 7 | 5 | 1 | 0 | 0 | 1 |
327,549 | 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/aot/compiled_module.py | wave_lang.aot.compiled_module.CompiledModuleMeta | from wave_lang.support.logging import aot_logger as logger
from typing import Any, Callable, Dict, Optional, Tuple, Union
from .support.ir_utils import ModuleBuilder, ModuleBuilderOptions
class CompiledModuleMeta(type):
"""Metaclass for all CompiledModule subclasses.
Do not use directly.
"""
def __ne... |
class CompiledModuleMeta(type):
'''Metaclass for all CompiledModule subclasses.
Do not use directly.
'''
def __new__(mcls, name: str, bases, dct, *, export_name: Optional[str]=None, options: Optional[ModuleBuilderOptions]=None):
pass
def __getattr__(cls, key):
pass | 3 | 1 | 32 | 3 | 24 | 5 | 7 | 0.38 | 1 | 7 | 3 | 1 | 2 | 0 | 2 | 15 | 75 | 9 | 48 | 19 | 37 | 18 | 37 | 11 | 34 | 11 | 2 | 3 | 14 |
327,550 | 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/aot/compiled_module.py | wave_lang.aot.compiled_module.ExportProcDef | from .tensor_traits import DeviceAffinity
from typing import Any, Callable, Dict, Optional, Tuple, Union
class ExportProcDef:
__slots__ = ['arg_device', 'callable', 'export_name', 'file_line_loc', 'signature']
def __init__(self, export_name: str, callable: Callable, *, signature, file_line_loc: Optional[Tuple... |
class ExportProcDef:
def __init__(self, export_name: str, callable: Callable, *, signature, file_line_loc: Optional[Tuple[str, int]]=None, arg_device: dict[int, DeviceAffinity] | None=None):
pass
def copy(self) -> 'ExportProcDef':
pass
def __repr__(self):
pass | 4 | 0 | 8 | 0 | 8 | 0 | 1 | 0 | 0 | 4 | 1 | 0 | 3 | 5 | 3 | 3 | 35 | 3 | 32 | 18 | 20 | 0 | 12 | 10 | 8 | 1 | 0 | 0 | 3 |
327,551 | 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/aot/compiled_module.py | wave_lang.aot.compiled_module.ExportTargetDef | from torch.export import ExportedProgram
from .tensor_traits import DeviceAffinity
from typing import Any, Callable, Dict, Optional, Tuple, Union
class ExportTargetDef:
def __init__(self, target: Union[Callable, ExportedProgram], *, arg_device: dict[int, DeviceAffinity] | None=None):
self.target = target
... |
class ExportTargetDef:
def __init__(self, target: Union[Callable, ExportedProgram], *, arg_device: dict[int, DeviceAffinity] | None=None):
pass
def __call__(self, *args, **kwargs):
pass | 3 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 0 | 3 | 1 | 0 | 2 | 2 | 2 | 2 | 12 | 1 | 11 | 10 | 3 | 0 | 6 | 5 | 3 | 1 | 0 | 0 | 2 |
327,552 | 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/aot/compiled_module.py | wave_lang.aot.compiled_module.ExportedProgramDef | from .tensor_traits import DeviceAffinity
from typing import Any, Callable, Dict, Optional, Tuple, Union
from torch.export import ExportedProgram
class ExportedProgramDef:
def __init__(self, ep: ExportedProgram, *, export_name: Optional[str]=None, public: bool=False, arg_device: dict[int, DeviceAffinity] | None=N... |
class ExportedProgramDef:
def __init__(self, ep: ExportedProgram, *, export_name: Optional[str]=None, public: bool=False, arg_device: dict[int, DeviceAffinity] | None=None):
pass
def copy(self) -> 'ExportedProgramDef':
pass
def __repr__(self):
pass | 4 | 0 | 7 | 0 | 7 | 0 | 1 | 0 | 0 | 5 | 1 | 0 | 3 | 4 | 3 | 3 | 24 | 2 | 22 | 15 | 11 | 0 | 10 | 8 | 6 | 1 | 0 | 0 | 3 |
327,553 | 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/aot/compiled_module.py | wave_lang.aot.compiled_module.ImportPhase | from typing import Any, Callable, Dict, Optional, Tuple, Union
import enum
class ImportPhase(enum.IntEnum):
TORCH_IR = 0
CUSTOM_OP_EXPANSION = 1
IMPORT = CUSTOM_OP_EXPANSION
IREE_INTERNAL = 2
FULL = IREE_INTERNAL
@staticmethod
def parse(spec: Union[str, None, 'ImportPhase']) -> 'ImportPhas... |
class ImportPhase(enum.IntEnum):
@staticmethod
def parse(spec: Union[str, None, 'ImportPhase']) -> 'ImportPhase':
pass
def __str__(self):
pass | 4 | 0 | 7 | 0 | 7 | 0 | 3 | 0.29 | 1 | 2 | 0 | 0 | 1 | 0 | 2 | 57 | 33 | 6 | 21 | 9 | 17 | 6 | 17 | 8 | 14 | 4 | 3 | 1 | 5 |
327,554 | 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/aot/compiled_module.py | wave_lang.aot.compiled_module.PyOnlyDef | class PyOnlyDef:
"""Exportable that does not export but can be resolved in Python."""
__slots__ = ['py_value']
def __init__(self, py_value):
self.py_value = py_value
def __str__(self):
return str(self.py_value)
def __repr__(self):
return repr(self.py_value)
def __call... | class PyOnlyDef:
'''Exportable that does not export but can be resolved in Python.'''
def __init__(self, py_value):
pass
def __str__(self):
pass
def __repr__(self):
pass
def __call__(self, *args, **kwargs):
pass | 5 | 1 | 2 | 0 | 2 | 0 | 1 | 0.1 | 0 | 1 | 0 | 0 | 4 | 1 | 4 | 4 | 16 | 5 | 10 | 7 | 5 | 1 | 10 | 7 | 5 | 1 | 0 | 0 | 4 |
327,555 | 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/aot/exporter.py | wave_lang.aot.exporter.ExportOutput | from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple, Type, Union, overload
import io
from .compiled_module import CompiledModule, ImportPhase, ModuleBuilderOptions
from wave_lang.support.ir_imports import Context, Operation
from collections.abc import Sequence
from iree.compiler.api import Outp... |
class ExportOutput:
'''Wrapper around a CompiledModule produced by `export`.'''
def __init__(self, session: Session, compiled_module: CompiledModule, *, importer_uses_session: bool=False):
pass
@property
def mlir_module(self) -> Operation:
'''Gets the MLIR module resulting from the las... | 9 | 7 | 15 | 1 | 9 | 4 | 2 | 0.47 | 0 | 9 | 2 | 0 | 7 | 3 | 7 | 7 | 115 | 15 | 68 | 30 | 48 | 32 | 48 | 17 | 40 | 8 | 0 | 2 | 15 |
327,556 | 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/aot/fx_programs.py | wave_lang.aot.fx_programs.FxPrograms | from typing import TYPE_CHECKING, Any, Optional, Union
import torch
from pathlib import Path
import os
from .compiled_module import ExportTargetDef
import json
class FxPrograms:
"""Represents a named set of ExportedPrograms.
This facility works around a design flaw in Torch where they conflated
ExportedPr... |
class FxPrograms:
'''Represents a named set of ExportedPrograms.
This facility works around a design flaw in Torch where they conflated
ExportedPrograms as representing a single entry-point while also having
each instance persist its own state_dict and constants. How many times,
in how many framewo... | 6 | 2 | 18 | 3 | 13 | 3 | 2 | 0.76 | 0 | 8 | 1 | 1 | 2 | 1 | 3 | 3 | 107 | 19 | 50 | 27 | 44 | 38 | 45 | 24 | 40 | 2 | 0 | 2 | 6 |
327,557 | 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/aot/fx_programs.py | wave_lang.aot.fx_programs.FxProgramsBuilder | import torch
from .decompositions import current_aot_decompositions
from .tensor_traits import DeviceAffinity
from .compiled_module import ExportTargetDef
from typing import TYPE_CHECKING, Any, Optional, Union
from torch import nn
import functools
class FxProgramsBuilder(FxPrograms):
"""Builds a new set of exporte... |
class FxProgramsBuilder(FxPrograms):
'''Builds a new set of exported programs that are all variations of the
same root nn.Module.
This can be used to construct multi-entrypoint sets of ExportedPrograms
in a way that alias information is preserved for lifted tensors.
Usage:
```
class MyModul... | 7 | 1 | 23 | 2 | 17 | 5 | 3 | 0.58 | 1 | 10 | 3 | 0 | 2 | 1 | 2 | 5 | 112 | 14 | 62 | 23 | 44 | 36 | 32 | 12 | 25 | 7 | 1 | 2 | 10 |
327,558 | 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/aot/fx_programs.py | wave_lang.aot.fx_programs.SharedStateTensor | import torch
class SharedStateTensor(torch.Tensor):
"""A fake tensor that we shove into ExportedProgram state to share."""
@staticmethod
def __new__(cls, size, dtype, shared_state_dict_key: str, is_param: bool, requires_grad=False):
return torch.Tensor._make_subclass(cls, torch.empty(size, dtype=d... |
class SharedStateTensor(torch.Tensor):
'''A fake tensor that we shove into ExportedProgram state to share.'''
@staticmethod
def __new__(cls, size, dtype, shared_state_dict_key: str, is_param: bool, requires_grad=False):
pass
def __init__(self, size, dtype, shared_state_dict_key: str, is_param:... | 4 | 1 | 14 | 0 | 12 | 2 | 1 | 0.2 | 1 | 2 | 0 | 0 | 1 | 2 | 2 | 2 | 32 | 2 | 25 | 20 | 7 | 5 | 6 | 5 | 3 | 1 | 1 | 0 | 2 |
327,559 | 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/aot/params.py | wave_lang.aot.params.ParameterArchive | from pathlib import Path
from typing import List, Optional, Set, Tuple, Union
from iree.runtime import ParameterIndex, ParameterIndexEntry
class ParameterArchive:
"""Allows access to a parameter archive as CPU tensors.
TODO: Add more helpers for reading tensors once we get upstream versions that
have that... |
class ParameterArchive:
'''Allows access to a parameter archive as CPU tensors.
TODO: Add more helpers for reading tensors once we get upstream versions that
have that integrated.
'''
def __init__(self, file_path: Optional[Union[str, Path]]=None, *, mmap: bool=True, readable: bool=True, writable: ... | 7 | 3 | 7 | 0 | 6 | 1 | 1 | 0.24 | 0 | 4 | 1 | 0 | 5 | 1 | 5 | 5 | 48 | 7 | 33 | 22 | 12 | 8 | 13 | 7 | 7 | 2 | 0 | 1 | 6 |
327,560 | 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/aot/params.py | wave_lang.aot.params.ParameterArchiveBuilder | from pathlib import Path
from typing import List, Optional, Set, Tuple, Union
from iree.runtime import ParameterIndex, ParameterIndexEntry
from torch import nn
import torch
class ParameterArchiveBuilder:
"""Helper for building parameter archives from live modules."""
def __init__(self):
self._index = ... |
class ParameterArchiveBuilder:
'''Helper for building parameter archives from live modules.'''
def __init__(self):
pass
@property
def index(self) -> ParameterIndex:
pass
def save(self, file_path: Union[str, Path]):
'''Saves the archive.'''
pass
def add_tensor(... | 8 | 5 | 5 | 0 | 3 | 2 | 1 | 0.55 | 0 | 2 | 0 | 0 | 6 | 1 | 6 | 6 | 41 | 7 | 22 | 14 | 14 | 12 | 20 | 13 | 13 | 2 | 0 | 1 | 8 |
327,561 | 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/aot/params.py | wave_lang.aot.params.ParameterArchiveEntry | import json
import torch
from iree.runtime import ParameterIndex, ParameterIndexEntry
import numpy as np
class ParameterArchiveEntry:
"""Wraps a raw ParameterIndexEntry with additional helpers."""
def __init__(self, raw: ParameterIndexEntry):
self.raw = raw
@property
def key(self) -> str:
... |
class ParameterArchiveEntry:
'''Wraps a raw ParameterIndexEntry with additional helpers.'''
def __init__(self, raw: ParameterIndexEntry):
pass
@property
def key(self) -> str:
pass
def as_flat_tensor(self) -> torch.Tensor:
'''Accesses the contents as a uint8 flat tensor.
... | 7 | 3 | 11 | 1 | 8 | 2 | 2 | 0.23 | 0 | 4 | 0 | 0 | 5 | 1 | 5 | 5 | 65 | 11 | 44 | 17 | 37 | 10 | 37 | 15 | 31 | 6 | 0 | 2 | 12 |
327,562 | 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/aot/tensor_traits.py | wave_lang.aot.tensor_traits.DeviceAffinity | from typing import Optional
class DeviceAffinity:
"""This is used to provide device affinities to exported function arguments."""
def __init__(self, ordinal: int, queues: Optional[list]=None):
self.ordinal = ordinal
self.queues = queues
def __eq__(self, other) -> bool:
if not isin... |
class DeviceAffinity:
'''This is used to provide device affinities to exported function arguments.'''
def __init__(self, ordinal: int, queues: Optional[list]=None):
pass
def __eq__(self, other) -> bool:
pass
def __repr__(self) -> str:
pass | 4 | 1 | 4 | 0 | 4 | 0 | 2 | 0.08 | 0 | 4 | 0 | 0 | 3 | 2 | 3 | 3 | 16 | 3 | 12 | 6 | 8 | 1 | 12 | 6 | 8 | 2 | 0 | 1 | 5 |
327,563 | 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/aot/tensor_traits.py | wave_lang.aot.tensor_traits.DeviceTensorTrait | from dataclasses import dataclass
from typing import Optional
import torch
@dataclass
class DeviceTensorTrait:
"""Represents a 'trait' that can be applied to a Tensor to signal that
it is to be loaded to a speific device at execution time.
"""
ordinal: int
queues: Optional[list] = None
@static... | @dataclass
class DeviceTensorTrait:
'''Represents a 'trait' that can be applied to a Tensor to signal that
it is to be loaded to a speific device at execution time.
'''
@staticmethod
def get(from_tensor: torch.Tensor) -> Optional['DeviceTensorTrait']:
pass
def set(self, to_tensor: torch... | 5 | 1 | 4 | 0 | 4 | 1 | 2 | 0.33 | 0 | 0 | 0 | 0 | 1 | 0 | 2 | 2 | 18 | 3 | 12 | 6 | 8 | 4 | 11 | 5 | 8 | 2 | 0 | 1 | 3 |
327,564 | 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/aot/tensor_traits.py | wave_lang.aot.tensor_traits.ExternalTensorTrait | from typing import Optional
import torch
from dataclasses import dataclass
@dataclass
class ExternalTensorTrait:
"""Represents a 'trait' that can be applied to a Tensor to signal that
it is to be loaded by name from an external archive at AOT execution time.
"""
external_scope: str
external_name: s... | @dataclass
class ExternalTensorTrait:
'''Represents a 'trait' that can be applied to a Tensor to signal that
it is to be loaded by name from an external archive at AOT execution time.
'''
@staticmethod
def get(from_tensor: torch.Tensor) -> Optional['ExternalTensorTrait']:
pass
def set(s... | 5 | 1 | 4 | 0 | 4 | 1 | 2 | 0.33 | 0 | 0 | 0 | 0 | 1 | 0 | 2 | 2 | 18 | 3 | 12 | 5 | 8 | 4 | 11 | 4 | 8 | 2 | 0 | 1 | 3 |
327,565 | 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/dynamo/type_conversion.py | wave_lang.dynamo.type_conversion.NativeTypeConverter | from typing import List, Optional
import re
from wave_lang.support.ir_imports import Context, F64Type, IntegerType, IrType, Location, Operation, RankedTensorType, ShapedType, Value, tensor_d
import functools
class NativeTypeConverter:
def __init__(self, context: Context):
self._context = context
s... |
class NativeTypeConverter:
def __init__(self, context: Context):
pass
def torch_type_to_native(self, torch_type: IrType, signless: bool=True) -> IrType:
'''Converts a presumed torch type to a corresponding native type.
This mirrors the type conversion in torch-mlir's BackendTypeConver... | 6 | 1 | 28 | 1 | 22 | 5 | 5 | 0.23 | 0 | 3 | 0 | 0 | 5 | 1 | 5 | 5 | 145 | 7 | 113 | 30 | 101 | 26 | 61 | 24 | 55 | 8 | 0 | 4 | 26 |
327,566 | 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/lang/grid.py | wave_lang.kernel.lang.grid.Grid | from .._support.indexing import IndexExpr, IndexingContext
from typing import ClassVar, Type, cast
from .._support.shaped_type import ShapedType
class Grid(metaclass=ShapedType):
"""Grid with bounding symbolic shape information in the type."""
symbolic_shape: ClassVar[tuple[IndexExpr, ...]]
rank: ClassVar[... |
class Grid(metaclass=ShapedType):
'''Grid with bounding symbolic shape information in the type.'''
def __init__(self):
pass
def __class_getitem__(cls, symbolic_shape: tuple[IndexExpr, ...] | IndexExpr) -> Type['Grid']:
pass
@property
def shape(self) -> tuple[int, ...]:
pas... | 9 | 1 | 4 | 0 | 4 | 0 | 1 | 0.07 | 1 | 6 | 1 | 0 | 7 | 0 | 7 | 24 | 41 | 9 | 30 | 13 | 19 | 2 | 26 | 10 | 18 | 3 | 3 | 2 | 10 |
327,567 | 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/lang/kernel_buffer.py | wave_lang.kernel.lang.kernel_buffer.AddressSpace | from enum import Enum
class AddressSpace(Enum):
REGISTER = 0
SHARED_MEMORY = 1
GLOBAL_MEMORY = 2 |
class AddressSpace(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,568 | 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/lang/kernel_buffer.py | wave_lang.kernel.lang.kernel_buffer.InputBuffer | class InputBuffer(KernelBuffer):
usage = KernelBufferUsage.INPUT | class InputBuffer(KernelBuffer):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
327,569 | 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/lang/kernel_buffer.py | wave_lang.kernel.lang.kernel_buffer.KernelBuffer | import torch
from typing import ClassVar, Type, TypeVar, cast
from .._support.indexing import IndexExpr
from .._support.dtype import DataType
from .. import ops
class KernelBuffer(metaclass=KernelBufferMeta):
"""Represents a buffer in global memory.
Top level kernels always operate on global memory via these
... |
class KernelBuffer(metaclass=KernelBufferMeta):
'''Represents a buffer in global memory.
Top level kernels always operate on global memory via these
buffers, and the primary operations that can be performed on
them are loads/stores and DMAs to some form of compute
capable local buffer.
When exe... | 8 | 2 | 6 | 1 | 5 | 0 | 2 | 0.28 | 1 | 5 | 1 | 3 | 6 | 1 | 6 | 30 | 60 | 14 | 36 | 15 | 26 | 10 | 31 | 12 | 24 | 4 | 5 | 1 | 10 |
327,570 | 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/lang/kernel_buffer.py | wave_lang.kernel.lang.kernel_buffer.KernelBufferMeta | from typing import ClassVar, Type, TypeVar, cast
from .._support.shaped_type import ShapedDataType
from .._support.dtype import DataType
from .._support.indexing import IndexExpr
class KernelBufferMeta(ShapedDataType):
usage: KernelBufferUsage = KernelBufferUsage.NONE
def new_subtype(cls: Type[SubtypeT], *, n... |
class KernelBufferMeta(ShapedDataType):
def new_subtype(cls: Type[SubtypeT], *, name: str | None=None, address_space: AddressSpace | None=None, symbolic_shape: tuple[IndexExpr, ...] | None=None, dtype: DataType | None=None, physical_layout: MemoryLayout | None=None, usage: KernelBufferUsage | None=None) -> Type[S... | 3 | 0 | 34 | 3 | 31 | 5 | 7 | 0.15 | 1 | 7 | 5 | 3 | 1 | 0 | 1 | 24 | 37 | 4 | 33 | 24 | 21 | 5 | 19 | 15 | 16 | 7 | 4 | 1 | 7 |
327,571 | 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/lang/kernel_buffer.py | wave_lang.kernel.lang.kernel_buffer.KernelBufferUsage | from enum import Enum
class KernelBufferUsage(Enum):
NONE = 0
INPUT = 1
OUTPUT = 2
TEMPORARY = 3
@staticmethod
def _type_name(v) -> str:
if v == KernelBufferUsage.NONE:
return 'KernelBuffer'
elif v == KernelBufferUsage.INPUT:
return 'InputBuffer'
... |
class KernelBufferUsage(Enum):
@staticmethod
def _type_name(v) -> str:
pass | 3 | 0 | 11 | 0 | 11 | 0 | 5 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 1 | 50 | 18 | 1 | 17 | 7 | 14 | 0 | 12 | 6 | 10 | 5 | 4 | 1 | 5 |
327,572 | 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/lang/kernel_buffer.py | wave_lang.kernel.lang.kernel_buffer.MemoryLayout | from dataclasses import dataclass
from .._support.indexing import IndexExpr
@dataclass
class MemoryLayout:
"""
Specifies the physical layout of a memory buffer in terms of
its physical shape.
"""
shape: tuple[int | IndexExpr] | @dataclass
class MemoryLayout:
'''
Specifies the physical layout of a memory buffer in terms of
its physical shape.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | 1 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 0 | 0 | 0 |
327,573 | 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/lang/kernel_buffer.py | wave_lang.kernel.lang.kernel_buffer.OutputBuffer | class OutputBuffer(KernelBuffer):
usage = KernelBufferUsage.OUTPUT | class OutputBuffer(KernelBuffer):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
327,574 | 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/lang/kernel_buffer.py | wave_lang.kernel.lang.kernel_buffer.TemporaryBuffer | class TemporaryBuffer(KernelBuffer):
usage = KernelBufferUsage.TEMPORARY | class TemporaryBuffer(KernelBuffer):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 6 | 0 | 0 |
327,575 | 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/lang/types.py | wave_lang.kernel.lang.types.Index | @_impl_fixed_int
class Index(int):
"""An index type that is isomorphic to MLIR `index`.
At the Python level, this is just an int.
"""
... | @_impl_fixed_int
class Index(int):
'''An index type that is isomorphic to MLIR `index`.
At the Python level, this is just an int.
'''
pass | 2 | 1 | 0 | 0 | 0 | 0 | 0 | 1.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 55 | 7 | 2 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 2 | 0 | 0 |
327,576 | 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/lang/types.py | wave_lang.kernel.lang.types.Vector | class Vector:
"""A tensor like type that is isomorphic to MLIR `vector`.
A vector has value semantics and allows computation over it.
"""
... | class Vector:
'''A tensor like type that is isomorphic to MLIR `vector`.
A vector has value semantics and allows computation over it.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | 2 | 2 | 1 | 1 | 4 | 2 | 1 | 1 | 0 | 0 | 0 | 0 |
327,577 | 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/lang/wave_types.py | wave_lang.kernel.lang.wave_types.IndexMapping | from itertools import chain
from typing import Any, ClassVar, Iterable, Optional, Sequence, Type, TypeAlias, TypeVar
from .._support.indexing import IndexExpr, IndexSymbol, index_symbol
from typing_extensions import Self
class IndexMapping:
"""
Represents a mapping between 2 sets of indices.
"""
iters:... |
class IndexMapping:
'''
Represents a mapping between 2 sets of indices.
'''
def __init__(self, num_iterators: int, inputs: SymbolsMap, outputs: SymbolsMap, dynamic_val_mappings: SymbolsMap | Sequence[SymbolsMap]=()) -> None:
pass
@property
def num_iterators(self) -> int:
pass
... | 21 | 1 | 5 | 0 | 5 | 0 | 1 | 0.04 | 0 | 6 | 0 | 0 | 12 | 0 | 14 | 14 | 105 | 18 | 84 | 38 | 53 | 3 | 55 | 22 | 40 | 5 | 0 | 2 | 18 |
327,578 | 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/lang/wave_types.py | wave_lang.kernel.lang.wave_types.Memory | from .kernel_buffer import AddressSpace, KernelBufferMeta, KernelBufferUsage, MemoryLayout
from typing import Any, ClassVar, Iterable, Optional, Sequence, Type, TypeAlias, TypeVar
from .._support.dtype import DataType
from .._support.indexing import IndexExpr, IndexSymbol, index_symbol
class Memory(metaclass=KernelBuf... |
class Memory(metaclass=KernelBufferMeta):
'''
Represents storage anywhere in the memory hierarchy except registers.
Parameterized by a shape, address space and element type. The allocated
memory is traversed by an iterator that specifies the offset, stride
and size along each dimension.
The sym... | 3 | 2 | 26 | 2 | 22 | 3 | 6 | 0.42 | 1 | 9 | 4 | 0 | 2 | 0 | 2 | 26 | 81 | 10 | 50 | 10 | 45 | 21 | 34 | 8 | 31 | 10 | 5 | 1 | 11 |
327,579 | 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/lang/wave_types.py | wave_lang.kernel.lang.wave_types.Register | from typing import Any, ClassVar, Iterable, Optional, Sequence, Type, TypeAlias, TypeVar
from .._support.indexing import IndexExpr, IndexSymbol, index_symbol
from .kernel_buffer import AddressSpace, KernelBufferMeta, KernelBufferUsage, MemoryLayout
from .._support.dtype import DataType
class Register(metaclass=KernelB... |
class Register(metaclass=KernelBufferMeta):
'''
Represents virtual registers. Parameterized by a shape and element type.
Instantiating this class emits a new `register` operation.
'''
def __new__(cls, value: float) -> 'Register':
pass
def __class_getitem__(cls, shape_and_dtype: tu... | 3 | 1 | 13 | 3 | 10 | 1 | 3 | 0.21 | 1 | 6 | 2 | 0 | 2 | 0 | 2 | 26 | 37 | 8 | 24 | 8 | 18 | 5 | 17 | 6 | 13 | 4 | 5 | 1 | 5 |
327,580 | 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/lang/wave_types.py | wave_lang.kernel.lang.wave_types.SymbolBind | from .._support.dtype import DataType
from typing import Any, ClassVar, Iterable, Optional, Sequence, Type, TypeAlias, TypeVar
class SymbolBind:
"""
Represents a binding between a symbol and a kernel argument.
"""
dtype: DataType
def __class_getitem__(cls, dt: DataType) -> Type['SymbolBind']:
... |
class SymbolBind:
'''
Represents a binding between a symbol and a kernel argument.
'''
def __class_getitem__(cls, dt: DataType) -> Type['SymbolBind']:
pass
class Subtype(cls):
pass | 3 | 1 | 6 | 1 | 5 | 0 | 1 | 0.43 | 0 | 2 | 2 | 0 | 1 | 0 | 1 | 1 | 13 | 3 | 7 | 4 | 4 | 3 | 7 | 4 | 4 | 1 | 0 | 0 | 1 |
327,581 | 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/base.py | wave_lang.kernel.ops.base.OpDispatcher | from typing import Type, TypeVar
from .._support import context
class OpDispatcher:
"""Handles dispatch of operations by their idname.
Operations are dispatched by looking up a function on the dispatcher like:
def handle_{idname}(self, operator, *args, **kwargs)
"""
__wave_context_idname__ = 'Op... |
class OpDispatcher:
'''Handles dispatch of operations by their idname.
Operations are dispatched by looking up a function on the dispatcher like:
def handle_{idname}(self, operator, *args, **kwargs)
'''
@classmethod
def current(cls: Type[OpDispatcherT]) -> OpDispatcherT:
pass
... | 5 | 1 | 2 | 0 | 2 | 0 | 1 | 0.44 | 0 | 0 | 0 | 1 | 2 | 0 | 3 | 3 | 18 | 5 | 9 | 6 | 4 | 4 | 8 | 5 | 4 | 1 | 0 | 0 | 3 |
327,582 | 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.Allocate | from dataclasses import dataclass, field, fields
from ..lang.wave_types import IndexMapping, Memory, Register
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
import torch.fx as fx
import math
from ..lang.kern... | @define_op('allocate')
@dataclass
class Allocate(CustomOp):
'''
Represents an allocation in an address space (such as shared memory).
'''
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
@property
def type(self) -> 'Memory':
pass
@property
def allocation_s... | 11 | 2 | 7 | 0 | 6 | 1 | 2 | 0.19 | 1 | 4 | 1 | 0 | 4 | 0 | 4 | 63 | 48 | 6 | 36 | 18 | 26 | 7 | 25 | 14 | 19 | 4 | 5 | 1 | 7 |
327,583 | 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.ApplyExpr | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
@define_op('apply_expr')
@dataclass
class ApplyExpr(CustomOp):
register_: fx.Proxy |... | @define_op('apply_expr')
@dataclass
class ApplyExpr(CustomOp):
@property
def type(self) -> 'Register':
pass
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass | 7 | 0 | 8 | 1 | 7 | 0 | 2 | 0 | 1 | 3 | 0 | 0 | 2 | 0 | 2 | 61 | 23 | 4 | 19 | 9 | 14 | 0 | 17 | 7 | 14 | 2 | 5 | 1 | 4 |
327,584 | 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.AtomicOp | 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
from abc import ABC
@define_op('atomic_min')
@dat... | @define_op('atomic_min')
@dataclass
class AtomicOp(BinaryOpBase, ABC):
'''
Represents an atomic operation in the graph. Takes in Register and
Memory as inputs and writes the modified value back on to the buffer.
Mapping attribute maps the index from wave kernel to the shared memory
index the wavegro... | 8 | 1 | 3 | 0 | 3 | 0 | 1 | 0.46 | 2 | 1 | 0 | 0 | 3 | 1 | 3 | 65 | 23 | 4 | 13 | 9 | 7 | 6 | 11 | 7 | 7 | 2 | 6 | 1 | 4 |
327,585 | 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.BinaryOpBase | 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
from .._support.dtype import DataType, i1
@dataclass
class BinaryOpB... | @dataclass
class BinaryOpBase(CustomOp, ABC):
'''
Represents an elementwise binary python operator.
DTYPE requirement: lhs and rhs needs to have the same dtpye.
Shape requirement: lhs and rhs either have same shape or
their shape must be broadcastable to
one... | 7 | 1 | 11 | 1 | 9 | 1 | 3 | 0.27 | 2 | 7 | 1 | 3 | 3 | 0 | 3 | 62 | 50 | 8 | 33 | 14 | 27 | 9 | 27 | 12 | 23 | 5 | 5 | 1 | 9 |
327,586 | 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.BinaryPyOp | from abc import ABC
from dataclasses import dataclass, field, fields
import operator
from ..lang.wave_types import IndexMapping, Memory, Register
@define_py_op(operator.add)
@define_py_op(operator.sub)
@define_py_op(operator.mul)
@define_py_op(operator.and_)
@define_py_op(operator.or_)
@define_py_op(operator.truediv)
... | @define_py_op(operator.add)
@define_py_op(operator.sub)
@define_py_op(operator.mul)
@define_py_op(operator.and_)
@define_py_op(operator.or_)
@define_py_op(operator.truediv)
@define_interface_op('maximum')
@define_interface_op('minimum')
@define_interface_op('atan2')
@define_interface_op('powf')
@dataclass
class BinaryP... | 13 | 0 | 7 | 0 | 5 | 2 | 2 | 0.33 | 2 | 1 | 1 | 0 | 1 | 1 | 1 | 63 | 8 | 0 | 6 | 3 | 4 | 2 | 5 | 3 | 3 | 2 | 6 | 1 | 2 |
327,587 | 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.BitcastOp | import torch.fx as fx
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
from .._support.dtype import DataType, i1
@define_op('bitcast')
@dataclass
class BitcastOp(Custom... | @define_op('bitcast')
@dataclass
class BitcastOp(CustomOp, ABC):
'''
Represents a bitcast operation.
'''
@property
def scale_factor(self):
pass
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
def infer_type(self, *args):
pass | 8 | 1 | 5 | 0 | 5 | 0 | 1 | 0.15 | 2 | 4 | 1 | 0 | 3 | 1 | 3 | 62 | 27 | 4 | 20 | 11 | 14 | 3 | 16 | 9 | 12 | 2 | 5 | 1 | 4 |
327,588 | 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.Broadcast | 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_op('broadcast')
@dataclass
class Broadcast(CustomOp, ABC):
'''
Represents a Broadcast operation.
arg: Source tensor/value to broadcast
target_shape: symbolic target broadcast shape.
'''
def __post_init__(self):
pass
@property
def indexing_dims(self) -> list[IndexSymbol]:... | 7 | 1 | 9 | 1 | 7 | 2 | 2 | 0.4 | 2 | 5 | 1 | 0 | 3 | 1 | 3 | 62 | 42 | 7 | 25 | 14 | 19 | 10 | 20 | 13 | 15 | 3 | 5 | 1 | 5 |
327,589 | 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.CastOp | import torch.fx as fx
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
from .._support.dtype import DataType, i1
@define_op('cast')
@dataclass
class CastOp(CustomOp, AB... | @define_op('cast')
@dataclass
class CastOp(CustomOp, ABC):
'''
Represents a cast operation.
'''
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass
def infer_type(self, *args):
pass | 6 | 1 | 3 | 0 | 3 | 0 | 1 | 0.33 | 2 | 2 | 1 | 0 | 2 | 1 | 2 | 61 | 15 | 3 | 9 | 6 | 5 | 3 | 8 | 5 | 5 | 1 | 5 | 0 | 2 |
327,590 | 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.ComparisonPyOp | import operator
from ..lang.wave_types import IndexMapping, Memory, Register
from dataclasses import dataclass, field, fields
from abc import ABC
from .._support.dtype import DataType, i1
@define_py_op(operator.eq)
@define_py_op(operator.gt)
@define_py_op(operator.ge)
@define_py_op(operator.lt)
@define_py_op(operator.... | @define_py_op(operator.eq)
@define_py_op(operator.gt)
@define_py_op(operator.ge)
@define_py_op(operator.lt)
@define_py_op(operator.le)
@define_py_op(operator.ne)
@define_interface_op('eq')
@define_interface_op('gt')
@define_interface_op('ge')
@define_interface_op('lt')
@define_interface_op('le')
@define_interface_op('n... | 15 | 0 | 5 | 0 | 3 | 2 | 2 | 0.5 | 2 | 1 | 1 | 0 | 1 | 1 | 1 | 63 | 6 | 0 | 4 | 4 | 2 | 2 | 4 | 4 | 2 | 2 | 6 | 0 | 2 |
327,591 | 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.Conditional | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
@define_op('conditional')
@dataclass
class Conditional(NestedRegionOp):
condition: f... | @define_op('conditional')
@dataclass
class Conditional(NestedRegionOp):
@classmethod
def handle(cls, graph, *args, **kwargs):
pass
def wrapper(f):
pass
@property
def indexing_dims(self) -> list[IndexSymbol]:
pass | 8 | 0 | 13 | 1 | 11 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 2 | 66 | 31 | 5 | 26 | 9 | 20 | 0 | 19 | 6 | 15 | 2 | 6 | 1 | 4 |
327,592 | 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.CustomOp | from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
import copy
import numpy as np
from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from abc import ABC
from .._support.regions import RegionGraph
from typing_exten... | @dataclass
class CustomOp(ABC):
'''
Base class for all custom fx nodes.
'''
@property
def location(self) -> Optional[FileLineColInfo | StackTraceInfo]:
pass
@classmethod
def from_fx_node(cls: Type[CustomOpT], node: fx.Node) -> CustomOpT:
pass
def __post_init__(self):... | 64 | 14 | 8 | 0 | 7 | 1 | 2 | 0.15 | 1 | 16 | 5 | 36 | 37 | 0 | 39 | 59 | 372 | 44 | 285 | 107 | 210 | 43 | 210 | 72 | 169 | 7 | 4 | 3 | 89 |
327,593 | 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.DebugLog | from dataclasses import dataclass, field, fields
from ..lang.wave_types import IndexMapping, Memory, Register
import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
@define_op('debug_log')
@dataclass
class DebugLog(CustomOp):
"""
An op for debugging.
... | @define_op('debug_log')
@dataclass
class DebugLog(CustomOp):
'''
An op for debugging.
Represents a write to an implicit global memory location.
The kernel will implicitly have an extra memory input added that will be injected by the Python kernel launcher.
The memory can be accessed by passing an an... | 10 | 1 | 4 | 1 | 3 | 0 | 1 | 0.85 | 1 | 2 | 1 | 0 | 4 | 1 | 4 | 63 | 61 | 13 | 26 | 18 | 18 | 22 | 21 | 15 | 16 | 1 | 5 | 0 | 4 |
327,594 | 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.Extract | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
import torch.fx as fx
from ..lang.wave_types import IndexMapping, Memory, Register
@define_op('extract')
@dataclass
class Extract(CustomOp):
"""
Op Rationale:
Extract is an op used to rep... | @define_op('extract')
@dataclass
class Extract(CustomOp):
'''
Op Rationale:
Extract is an op used to represent extracting of
a scalar from TKW's 1-D vector on the specified index.
This can also be viewed as indexing/slicing on the fastest
dimension. Hence, the semantic of this op is designed to
... | 4 | 1 | 21 | 1 | 15 | 5 | 4 | 0.72 | 1 | 3 | 1 | 0 | 1 | 1 | 1 | 60 | 36 | 5 | 18 | 8 | 16 | 13 | 16 | 8 | 14 | 4 | 5 | 1 | 4 |
327,595 | 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.ExtractSlice | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
import torch.fx as fx
@define_op('extract_slice')
@dataclass
class ExtractSlice(CustomOp):
register_: fx.Proxy
offset: tuple[IndexExpr]
size: tuple[IndexExpr]
stride: tuple[IndexExpr]
... | @define_op('extract_slice')
@dataclass
class ExtractSlice(CustomOp):
@property
def type(self) -> 'Register':
pass
@property
def rank(self) -> int:
pass | 7 | 0 | 5 | 0 | 5 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 61 | 19 | 2 | 17 | 8 | 12 | 0 | 13 | 6 | 10 | 1 | 5 | 0 | 2 |
327,596 | 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.GatherToLDS | 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
from .._support.dtype import DataType, i1
@define... | @define_op('gather_to_lds')
@dataclass
class GatherToLDS(CustomOp):
'''
Represents an instruction that performs direct load from global
to lds. Source node points to the global memory to load from
and the destination node points to shared memory.
'''
pass | 3 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 16 | 1 | 10 | 1 | 9 | 5 | 10 | 1 | 9 | 0 | 5 | 0 | 0 |
327,597 | 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.GetResult | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
import torch.fx as fx
import operator
from dataclasses import dataclass, field, fields
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
@define_py_op(operator.getitem)
@define_op('get_result')
@dataclass
clas... | @define_py_op(operator.getitem)
@define_op('get_result')
@dataclass
class GetResult(CustomOp):
def infer_type(self, *args):
pass
@property
def indexing_dims(self) -> list[IndexExpr]:
pass
def has_multiple_value(x):
pass
def is_valid_indexing_dim(x):
... | 15 | 0 | 10 | 0 | 9 | 1 | 3 | 0.1 | 1 | 5 | 2 | 0 | 4 | 1 | 4 | 63 | 50 | 5 | 41 | 16 | 33 | 4 | 32 | 13 | 27 | 4 | 5 | 2 | 10 |
327,598 | 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.IterArg | from dataclasses import dataclass, field, fields
@dataclass
class IterArg(Placeholder):
"""
Represents a specific placeholder node in the graph that is an iter arg of
a reduction node. IterArgs can be of type Register or Memory with
a Shared memory address space.
"""
def parent_op(self):
... | @dataclass
class IterArg(Placeholder):
'''
Represents a specific placeholder node in the graph that is an iter arg of
a reduction node. IterArgs can be of type Register or Memory with
a Shared memory address space.
'''
def parent_op(self):
pass
@property
def iter_idx(self):
... | 10 | 1 | 3 | 0 | 3 | 0 | 1 | 0.27 | 1 | 0 | 0 | 0 | 4 | 1 | 4 | 72 | 23 | 4 | 15 | 10 | 8 | 4 | 13 | 8 | 8 | 2 | 6 | 1 | 5 |
327,599 | 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.Iterate | from .._support.indexing import IndexExpr, IndexSequence, IndexSymbol
from dataclasses import dataclass, field, fields
from .._support.regions import RegionGraph
import torch.fx as fx
from typing import TYPE_CHECKING, Any, Callable, Optional, Sequence, Type, TypeVar, final
@define_op('iterate')
@dataclass
class Iterat... | @define_op('iterate')
@dataclass
class Iterate(NestedRegionOp):
@classmethod
def handle(cls, graph: RegionGraph, *args, **kwargs):
pass
def wrapper(f):
pass
@property
def indexing_dims(self) -> list[IndexSymbol] | list[list[IndexSymbol]]:
pass
def iter_args... | 19 | 0 | 12 | 1 | 11 | 1 | 3 | 0.03 | 1 | 11 | 6 | 0 | 8 | 1 | 9 | 73 | 119 | 13 | 103 | 40 | 86 | 3 | 75 | 33 | 64 | 4 | 6 | 3 | 25 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.