mirror of
https://github.com/ROCm/ROCm.git
synced 2026-04-05 03:01:17 -04:00
fix issues
This commit is contained in:
@@ -135,7 +135,7 @@ struct LoadOpConversion
|
||||
builder.create<mlir::scf::YieldOp>(loc, ValueRange({loadVal}));
|
||||
},
|
||||
[&](OpBuilder &builder, Location loc){
|
||||
Value zeroVal = bitcast(int_val(valueElemNbits, 0), IntegerType::get(getContext(), width));
|
||||
Value zeroVal = bitcast(int_val(valueElemNBits, 0), IntegerType::get(getContext(), width));
|
||||
Value otherVal;
|
||||
if (other) {
|
||||
auto vecTy = LLVM::getFixedVectorType(valueElemTy, wordNElems);
|
||||
|
||||
@@ -48,6 +48,7 @@ public:
|
||||
addLegalDialect<LLVM::LLVMDialect>();
|
||||
if (isROCM) {
|
||||
addLegalDialect<ROCDL::ROCDLDialect>();
|
||||
addLegalDialect<mlir::scf::SCFDialect>();
|
||||
} else {
|
||||
addLegalDialect<NVVM::NVVMDialect>();
|
||||
}
|
||||
@@ -98,11 +99,10 @@ struct FuncOpConversion : public FuncOpConversionBase {
|
||||
// Set an attribute to indicate this function is a kernel entry.
|
||||
newFuncOp->setAttr("nvvm.kernel",
|
||||
rewriter.getIntegerAttr(type::u1Ty(ctx), 1));
|
||||
#ifndef USE_ROCM
|
||||
|
||||
// Set an attribute for maxntidx, it could be used in latter LLVM codegen
|
||||
// for `nvvm.annotation` metadata.
|
||||
newFuncOp->setAttr("nvvm.maxntid", rewriter.getI32ArrayAttr(32 * numWarps));
|
||||
#endif
|
||||
|
||||
rewriter.eraseOp(funcOp);
|
||||
return success();
|
||||
@@ -119,6 +119,7 @@ public:
|
||||
addLegalDialect<LLVM::LLVMDialect>();
|
||||
if (isROCM) {
|
||||
addLegalDialect<ROCDL::ROCDLDialect>();
|
||||
addLegalDialect<mlir::scf::SCFDialect>();
|
||||
} else {
|
||||
addLegalDialect<NVVM::NVVMDialect>();
|
||||
}
|
||||
|
||||
@@ -240,7 +240,6 @@ static bool linkExternLib(llvm::Module &module, llvm::StringRef name,
|
||||
assert(false && "unknown extern lib: ");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -19,9 +19,9 @@ sh scripts/amd/clean.sh
|
||||
# UNIT_TEST="python/test/unit/language/test_core_amd.py"
|
||||
# UNIT_TEST="python/test/unit/language/test_core.py::test_empty_kernel[float32]"
|
||||
# UNIT_TEST="python/test/unit/language/test_core.py::test_bin_op"
|
||||
# UNIT_TEST="python/test/unit/language/test_core.py::test_bin_op[float32-float32-+]"
|
||||
UNIT_TEST="python/test/unit/language/test_core.py::test_bin_op[float32-float32-+]"
|
||||
# UNIT_TEST="python/test/unit/language/test_core.py::test_bin_op[int8-float16-%]"
|
||||
UNIT_TEST="python/test/unit/language/test_elementwise.py"
|
||||
# UNIT_TEST="python/test/unit/language/test_elementwise.py"
|
||||
|
||||
# check for backtrace
|
||||
if [ "$1" == "backtrace" ]; then
|
||||
|
||||
Reference in New Issue
Block a user