File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
third_party/intel/lib/TritonIntelGPUToLLVM Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,18 @@ class LoadStorePrefetchOpConversion
156156 matchAndRewrite (OpType op, typename OpType::Adaptor adaptor,
157157 ConversionPatternRewriter &rewriter) const override {
158158 auto ptrType = cast<PointerType>(op.getPtr ().getType ());
159+ // scalar load/store
160+ if (!isa<RankedTensorType>(ptrType.getPointeeType ())) {
161+ if constexpr (std::is_same_v<OpType, LoadOp>) {
162+ auto newLoad = rewriter.create <LLVM::LoadOp>(op.getLoc (), op.getType (),
163+ adaptor.getPtr ());
164+ rewriter.replaceOp (op, newLoad);
165+ return success ();
166+ }
167+ assert (0 && " add more support" );
168+ return failure ();
169+ }
170+ // blocked load/store
159171 auto tensorType = cast<RankedTensorType>(ptrType.getPointeeType ());
160172 assert (tensorType.getRank () == 2 &&
161173 " only support 2d load/store/prefetch for now" );
You can’t perform that action at this time.
0 commit comments