File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
jaxlib/mosaic/dialect/tpu/transforms Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -122,6 +122,14 @@ void tpu_strided_store_rule(tpu::StridedStoreOp op) {
122122 /* strides=*/ op.getStrides ());
123123}
124124
125+ void tpu_vector_store_rule (tpu::VectorStoreOp op) {
126+ // TODO(b/379925823): Take strides into account.
127+ assertIsValidSubwindow (
128+ op, op.getIndices (),
129+ /* window_shape=*/ op.getValueToStore ().getType ().getShape (),
130+ /* full_shape=*/ op.getBase ().getType ().getShape ());
131+ }
132+
125133const llvm::StringMap<rule_type> &rules () {
126134 static auto rules = new llvm::StringMap<rule_type>{
127135 // TODO: tpu::LoadOp, tpu::StoreOp
@@ -133,6 +141,8 @@ const llvm::StringMap<rule_type> &rules() {
133141 as_generic_rule (tpu_strided_load_rule)},
134142 {tpu::StridedStoreOp::getOperationName (),
135143 as_generic_rule (tpu_strided_store_rule)},
144+ {tpu::VectorStoreOp::getOperationName (),
145+ as_generic_rule (tpu_vector_store_rule)},
136146 };
137147 return *rules;
138148}
You can’t perform that action at this time.
0 commit comments