Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[nvq++] Removes MLIR's memref dialect. #2438

Merged
merged 5 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions include/cudaq/Optimizer/InitAllDialects.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/Math/IR/Math.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"

namespace cudaq {

Expand All @@ -31,7 +30,6 @@ inline void registerAllDialects(mlir::DialectRegistry &registry) {
mlir::func::FuncDialect,
mlir::LLVM::LLVMDialect,
mlir::math::MathDialect,
mlir::memref::MemRefDialect,

// CUDA-Q dialects
cudaq::cc::CCDialect,
Expand Down
12 changes: 6 additions & 6 deletions test/Quake/lambda_kernel_exec.qke
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ module attributes {quake.mangled_name_map = {__nvqpp__mlirgen__lambda.main.canHa
%4 = arith.extsi %c0_i32_0 : i32 to i64
%5 = quake.extract_ref %1[%4] : (!quake.veq<?>, i64) -> !quake.ref
%16 = quake.mz %5 name "b" : (!quake.ref) -> !quake.measure
%alloca = memref.alloca() : memref<i1>
%alloca = cc.alloca i1
%6 = quake.discriminate %16 : (!quake.measure) -> i1
memref.store %6, %alloca[] : memref<i1>
%7 = memref.load %alloca[] : memref<i1>
cc.store %6, %alloca : !cc.ptr<i1>
%7 = cc.load %alloca : !cc.ptr<i1>
cc.if(%7) {
cc.scope {
%c1_i32_1 = arith.constant 1 : i32
Expand Down Expand Up @@ -67,9 +67,9 @@ module attributes {quake.mangled_name_map = {__nvqpp__mlirgen__lambda.main.canHa
%5 = quake.extract_ref %1[%4] : (!quake.veq<?>,i64) -> !quake.ref
%16 = quake.mz %5 name "b" : (!quake.ref) -> !quake.measure
%6 = quake.discriminate %16 : (!quake.measure) -> i1
%alloca = memref.alloca() : memref<i1>
memref.store %6, %alloca[] : memref<i1>
%7 = memref.load %alloca[] : memref<i1>
%alloca = cc.alloca i1
cc.store %6, %alloca : !cc.ptr<i1>
%7 = cc.load %alloca : !cc.ptr<i1>
cc.if(%7) {
cc.scope {
%c1_i32_1 = arith.constant 1 : i32
Expand Down
Loading
Loading