Enzyme
main
Loading...
Searching...
No Matches
MLIR
Dialect
LLVMExt
LLVMExtOps.cpp
Go to the documentation of this file.
1
#include "
Dialect/LLVMExt/LLVMExt.h
"
2
3
namespace
mlir
{
4
namespace
enzyme {}
// namespace enzyme
5
}
// namespace mlir
6
7
#define GET_OP_CLASSES
8
#include "Dialect/LLVMExt/LLVMExtOps.cpp.inc"
9
10
using namespace
mlir
;
11
using namespace
mlir::enzyme
;
12
13
// A copy is lowered as one operation in one memory space -- a host memcpy or a
14
// device-to-device runtime copy -- so a mismatch here is a transfer nothing
15
// downstream can express, not something to silently pick a side of.
16
LogicalResult llvm_ext::MemcpyOp::verify() {
17
auto
dstSpace =
18
cast<LLVM::LLVMPointerType>(getDst().getType()).getAddressSpace();
19
auto
srcSpace =
20
cast<LLVM::LLVMPointerType>(getSrc().getType()).getAddressSpace();
21
if
(dstSpace != srcSpace)
22
return
emitOpError() <<
"destination is in memory space "
<< dstSpace
23
<<
" but source is in memory space "
<< srcSpace
24
<<
"; a copy across memory spaces is not supported"
;
25
return
success();
26
}
LLVMExt.h
mlir::enzyme
Definition
ActivityAnalysis.h:14
mlir
Definition
ActivityAnalysis.h:9
Generated on Tue Oct 13 2026 01:33:28 for Enzyme by
1.12.0