Skip to content

Commit

Permalink
Remove HashOutput (#68)
Browse files Browse the repository at this point in the history
Feature can be resurrected when bandwidth exists to make it actually work
  • Loading branch information
drhagen committed Jun 14, 2024
1 parent 66b87e8 commit db59bce
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 586 deletions.
7 changes: 1 addition & 6 deletions src/tensora/codegen/_type_to_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from functools import singledispatch

from ..ir.types import Array, FixedArray, Float, HashTable, Integer, Mode, Pointer, Tensor, Type
from ..ir.types import Array, FixedArray, Float, Integer, Mode, Pointer, Tensor, Type


def space_variable(variable: str | None = None) -> str:
Expand Down Expand Up @@ -37,11 +37,6 @@ def type_to_c_mode(self: Mode, variable: str | None = None) -> str:
return "taco_mode_t" + space_variable(variable)


@type_to_c.register(HashTable)
def type_to_c_hash_table(self: HashTable, variable: str | None = None) -> str:
return "hash_table_t" + space_variable(variable)


@type_to_c.register(Pointer)
def type_to_c_pointer(self: Pointer, variable: str | None = None) -> str:
return f"{type_to_c(self.target)}* restrict" + space_variable(variable)
Expand Down
10 changes: 0 additions & 10 deletions src/tensora/ir/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
"tensor",
"Mode",
"mode",
"HashTable",
"hash_table",
"Pointer",
"Array",
"FixedArray",
Expand Down Expand Up @@ -54,14 +52,6 @@ class Mode(Type):
mode = Mode()


@dataclass(frozen=True, slots=True)
class HashTable(Type):
pass


hash_table = HashTable()


@dataclass(frozen=True, slots=True)
class Pointer(Type):
target: Type
Expand Down
1 change: 0 additions & 1 deletion src/tensora/iteration_graph/outputs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from ._append import AppendOutput
from ._base import Output
from ._bucket import BucketOutput
from ._hash import HashOutput
10 changes: 4 additions & 6 deletions src/tensora/iteration_graph/outputs/_append.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
from ..identifiable_expression import ast as ie_ast
from ._base import Output
from ._bucket import BucketOutput
from ._hash import HashOutput

default_array_size = Multiply(IntegerLiteral(1024), IntegerLiteral(1024))

Expand Down Expand Up @@ -151,9 +150,8 @@ def next_output(
)
return next_output, next_output.write_declarations(bucket), SourceBuilder()
else:
next_output = HashOutput(self.output, self.next_layer)
return (
next_output,
next_output.write_declarations(),
next_output.write_cleanup(kernel_type),
raise NotImplementedError(
"Encountered a sparse output layer preceded by a contraction layer or a later "
"output layer. This requires a hash table to store intermediate outputs, "
"which is not currently implemented."
)
326 changes: 0 additions & 326 deletions src/tensora/iteration_graph/outputs/_hash.py

This file was deleted.

Loading

0 comments on commit db59bce

Please sign in to comment.