@@ -1361,8 +1361,8 @@ static func::FuncOp createGPUWrapper(ModuleOp module,
13611361 // Emit device selection
13621362 if (deviceNum.getNumOccurrences () > 0 )
13631363 b.create <gpu::SetDefaultDeviceOp>(
1364- loc, b.create <arith::ConstantIntOp>(loc, deviceNum. getValue ( ),
1365- b. getIntegerType ( 32 )));
1364+ loc, b.create <arith::ConstantIntOp>(loc, b. getIntegerType ( 32 ),
1365+ deviceNum. getValue ( )));
13661366
13671367 SmallVector<Value, 4 > cpuMem;
13681368 SmallVector<Value, 4 > gpuMem;
@@ -1569,7 +1569,7 @@ static LogicalResult populateRandomTensorFillLogic(OpBuilder &b, Location loc,
15691569 if (i16vals.find (v) == i16vals.end ()) {
15701570 auto i16Type = b.getIntegerType (16 );
15711571 i16vals.try_emplace (
1572- v, b.createOrFold <arith::ConstantIntOp>(loc, v, i16Type ));
1572+ v, b.createOrFold <arith::ConstantIntOp>(loc, i16Type, v ));
15731573 }
15741574 return i16vals[v];
15751575 };
@@ -3924,7 +3924,7 @@ static func::FuncOp createVerifierFunc(ModuleOp module, const KernelIF &kernel,
39243924
39253925 auto getF32Val = [&](float val) -> Value {
39263926 llvm::APFloat apVal (val);
3927- return b.create <arith::ConstantFloatOp>(loc, apVal, floatType );
3927+ return b.create <arith::ConstantFloatOp>(loc, floatType, apVal );
39283928 };
39293929 // Thresholds for different metrics
39303930 // RMS: 0.00003f for all data types
@@ -4386,7 +4386,7 @@ static LogicalResult populateHostHarnessLogic(
43864386 if (isRandom) {
43874387 auto seedFunc = makeFuncDecl (module , " seedRandomValues" , {b.getI32Type ()});
43884388 int seed = getRandomSeed ();
4389- Value seedConst = b.create <arith::ConstantIntOp>(loc, seed, b.getI32Type ());
4389+ Value seedConst = b.create <arith::ConstantIntOp>(loc, b.getI32Type (), seed );
43904390 b.create <func::CallOp>(loc, seedFunc, seedConst);
43914391 }
43924392
@@ -4458,7 +4458,7 @@ static LogicalResult populateHostHarnessLogic(
44584458 for (auto pair : llvm::enumerate (currentSeqLen)) {
44594459 Value index = b.create <arith::ConstantIndexOp>(loc, pair.index ());
44604460 Value value =
4461- b.create <arith::ConstantIntOp>(loc, pair. value (), b. getI32Type ());
4461+ b.create <arith::ConstantIntOp>(loc, b. getI32Type (), pair. value ());
44624462 b.create <memref::StoreOp>(loc, value, lvar, ValueRange{index});
44634463 }
44644464 } else if (!isRandom) {
0 commit comments