@@ -302,7 +302,7 @@ LogicalResult AIETargetBackend::serializeExecutable(
302
302
llvm::sys::path::append (npuInstPath,
303
303
entryPointNamesFb[ordinal] + " .npu.txt" );
304
304
305
- // Convert ordinal to hexadecimal string for xclbin kern id
305
+ // Convert ordinal to hexadecimal string for xclbin kernel id.
306
306
std::stringstream ss;
307
307
ss << " 0x" << std::hex << ordinal + 10 ;
308
308
std::string ordinalHex = ss.str ();
@@ -370,7 +370,7 @@ LogicalResult AIETargetBackend::serializeExecutable(
370
370
int result = llvm::sys::ExecuteAndWait (cmdArgs[0 ], cmdArgs, cmdEnvRefs);
371
371
if (result != 0 && AttemptingMerge) {
372
372
// we failed to create xclbin but maybe we failed becuase we were trying
373
- // to merge the kerenel in exisiting kernel , try again to see if perhaps
373
+ // to merge the kerenel in exisiting xclbin , try again to see if perhaps
374
374
// we have success if we dont try to merge.
375
375
AttemptingMerge = false ;
376
376
result =
@@ -400,18 +400,8 @@ LogicalResult AIETargetBackend::serializeExecutable(
400
400
asmInstrIndices[ordinal] = asmInstrRefs.size ();
401
401
asmInstrRefs.push_back (
402
402
iree_amd_aie_hal_xrt_AsmInstDef_create (builder, npuInstrsVec));
403
- /*
404
- xclbinIn = openInputFile(xclbinPath, &errorMessage);
405
- if (!xclbinIn) {
406
- moduleOp.emitOpError() << "Failed to open xclbin file: " << errorMessage;
407
- }
408
- auto xclbinStringRef = builder.createString(xclbinIn->getBuffer());
409
- xclbinIndices[ordinal] = xclbinRefs.size();
410
- xclbinRefs.push_back(
411
- iree_amd_aie_hal_xrt_XclbinDef_create(builder, xclbinStringRef));
412
- */
413
403
}
414
- // write out the final xclbins to flatbuffer
404
+ // Write out the final xclbins to flatbuffer.
415
405
for (auto xclbinPath : xclbinPaths) {
416
406
llvm::outs () << " writing xclbin from path: " << xclbinPath << " \n " ;
417
407
std::string errorMessage;
@@ -424,7 +414,7 @@ LogicalResult AIETargetBackend::serializeExecutable(
424
414
iree_amd_aie_hal_xrt_XclbinDef_create (builder, xclbinStringRef));
425
415
}
426
416
427
- // Serialize the executable to flatbuffer format
417
+ // Serialize the executable to flatbuffer format.
428
418
auto entryPointsRef = builder.createStringVec (entryPointNamesFb);
429
419
430
420
iree_amd_aie_hal_xrt_ExecutableDef_entry_points_add (builder, entryPointsRef);
0 commit comments