Skip to content

Commit

Permalink
Updated frontends to use the new sparse tensor declaration op
Browse files Browse the repository at this point in the history
  • Loading branch information
pthomadakis committed Jun 12, 2024
1 parent 4aebd1b commit 8cb88e4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ $ patch -s -p0 < comet-blis.patch
```
$ cd $COMET_SRC
$ cd blis
$ ./configure --prefix=$COMET_SRC/install auto
$ ./configure --prefix=$COMET_SRC/install --disable-shared auto
$ make [-j]
$ make check [-j]
$ make install [-j]
Expand Down
8 changes: 4 additions & 4 deletions frontends/numpy-scipy/cometpy/MLIRGen/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ class Tensor_Decl_Builder:

tensor_decl_wrapper_text = jinja2.Template(
("" * indentation_size)
+ '%t{{lhs}} = "ta.{{decl}}_tensor_decl"{{dims_tuple}}'
+ '%t{{lhs}} = "ta.{{decl}}ensor_decl"{{dims_tuple}}'
+ '{format = {{format}}} : '
+"{{ranges_tuple}} -> "
+ "{{inputtype}}"
Expand All @@ -521,7 +521,7 @@ class Tensor_Decl_Builder:

tensor_decl_wrapper_text_no_fill = jinja2.Template(
("" * indentation_size)
+ '%t{{lhs}} = "ta.{{decl}}_tensor_decl"{{dims_tuple}}'
+ '%t{{lhs}} = "ta.{{decl}}ensor_decl"{{dims_tuple}}'
+ '{format = {{format}}} : '
+"{{ranges_tuple}} -> "
+ "{{inputtype}}"
Expand Down Expand Up @@ -558,7 +558,7 @@ def build_tensor(self):
ranges_tuple = ranges_tuple,
format = format,
inputtype = self.inputtype,
decl = "dense" if self.format == DENSE else "sparse",
decl = "dense_t" if self.format == DENSE else "spT",
where = where,
value = value
)
Expand All @@ -569,7 +569,7 @@ def build_tensor(self):
ranges_tuple = ranges_tuple,
format = format,
inputtype = self.inputtype,
decl = "dense" if self.format == DENSE else "sparse",
decl = "dense_t" if self.format == DENSE else "spT",
)

class PrintBuilder:
Expand Down
2 changes: 1 addition & 1 deletion frontends/rust/comet-rs/impl/src/tensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl TensorStruct {
}
_ => {
let mut temp_res = format!(
"%{} = \"ta.sparse_tensor_decl\"({}) {{format = \"{}\", temporal_tensor = {}}} : ({}) -> {}\n",
"%{} = \"ta.spTensor_decl\"({}) {{format = \"{}\", temporal_tensor = {}}} : ({}) -> {}\n",
self.mlir_id,
ids,
self.format,
Expand Down

0 comments on commit 8cb88e4

Please sign in to comment.