@@ -302,7 +302,7 @@ LogicalResult AIETargetBackend::serializeExecutable(
302302 llvm::sys::path::append (npuInstPath,
303303 entryPointNamesFb[ordinal] + " .npu.txt" );
304304
305- // Convert ordinal to hexadecimal string for xclbin kern id
305+ // Convert ordinal to hexadecimal string for xclbin kernel id.
306306 std::stringstream ss;
307307 ss << " 0x" << std::hex << ordinal + 10 ;
308308 std::string ordinalHex = ss.str ();
@@ -370,7 +370,7 @@ LogicalResult AIETargetBackend::serializeExecutable(
370370 int result = llvm::sys::ExecuteAndWait (cmdArgs[0 ], cmdArgs, cmdEnvRefs);
371371 if (result != 0 && AttemptingMerge) {
372372 // 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
374374 // we have success if we dont try to merge.
375375 AttemptingMerge = false ;
376376 result =
@@ -400,18 +400,8 @@ LogicalResult AIETargetBackend::serializeExecutable(
400400 asmInstrIndices[ordinal] = asmInstrRefs.size ();
401401 asmInstrRefs.push_back (
402402 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- */
413403 }
414- // write out the final xclbins to flatbuffer
404+ // Write out the final xclbins to flatbuffer.
415405 for (auto xclbinPath : xclbinPaths) {
416406 llvm::outs () << " writing xclbin from path: " << xclbinPath << " \n " ;
417407 std::string errorMessage;
@@ -424,7 +414,7 @@ LogicalResult AIETargetBackend::serializeExecutable(
424414 iree_amd_aie_hal_xrt_XclbinDef_create (builder, xclbinStringRef));
425415 }
426416
427- // Serialize the executable to flatbuffer format
417+ // Serialize the executable to flatbuffer format.
428418 auto entryPointsRef = builder.createStringVec (entryPointNamesFb);
429419
430420 iree_amd_aie_hal_xrt_ExecutableDef_entry_points_add (builder, entryPointsRef);
0 commit comments