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 @@ -154,6 +154,18 @@ class LoadStorePrefetchOpConversion
154154 matchAndRewrite (OpType op, typename OpType::Adaptor adaptor,
155155 ConversionPatternRewriter &rewriter) const override {
156156 auto ptrType = cast<PointerType>(op.getPtr ().getType ());
157+ // scalar load/store
158+ if (!isa<RankedTensorType>(ptrType.getPointeeType ())) {
159+ if constexpr (std::is_same_v<OpType, LoadOp>) {
160+ auto newLoad = rewriter.create <LLVM::LoadOp>(op.getLoc (), op.getType (),
161+ adaptor.getPtr ());
162+ rewriter.replaceOp (op, newLoad);
163+ return success ();
164+ }
165+ assert (0 && " add more support" );
166+ return failure ();
167+ }
168+ // blocked load/store
157169 auto tensorType = cast<RankedTensorType>(ptrType.getPointeeType ());
158170 assert (tensorType.getRank () == 2 &&
159171 " only support 2d load/store/prefetch for now" );
You can’t perform that action at this time.
0 commit comments