Skip to content

Commit

Permalink
incorporate comments
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Aug 24, 2024
1 parent 611bc00 commit 767c9c4
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,6 @@ bool hasEnding(std::string const &fullString, std::string const &ending) {
return false;
}

// Returns either:
// -- the output of running the tool, if run without failure, or
// -- an empty optional, if the tool fails to run.
LogicalResult runTool(
const std::string &program_, const std::vector<std::string> &args,
bool verbose, std::optional<std::vector<std::string>> env = std::nullopt) {
Expand Down Expand Up @@ -339,6 +336,7 @@ LogicalResult runTool(
SmallVector<std::optional<StringRef>> redirects;
#ifdef _WIN32
redirects = {{}, {}, {}};
// Explicit type but this never actually constructs an ArrayRef
std::optional<ArrayRef<StringRef>> envSmallVec = std::nullopt;
#else
std::string temporaryPathStr =
Expand Down
3 changes: 2 additions & 1 deletion runtime/src/iree-amd-aie/aie_runtime/iree_aie_configure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ LogicalResult pushToBdQueueAndEnable(const AMDAIEDeviceModel &deviceModel,
}

LogicalResult addElfToTile(const AMDAIEDeviceModel &deviceModel,
const TileLoc &tileLoc, Path &elfPath, bool aieSim) {
const TileLoc &tileLoc, const Path &elfPath,
bool aieSim) {
auto devInst = const_cast<XAie_DevInst *>(&deviceModel.devInst);
if (!std::filesystem::exists(elfPath)) {
llvm::errs() << "elf doesn't exist: " << elfPath.string() << "\n";
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree-amd-aie/aie_runtime/iree_aie_configure.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ LogicalResult generateCDOBinary(const std::filesystem::path &outputPath,
/// CDO.
LogicalResult addElfToTile(const AMDAIEDeviceModel &deviceModel,
const TileLoc &tileLoc,
std::filesystem::path &elfPath, bool aieSim);
const std::filesystem::path &elfPath, bool aieSim);

/// Turn off and turn it back on again...
LogicalResult resetUnResetCore(const AMDAIEDeviceModel &deviceModel,
Expand Down
6 changes: 3 additions & 3 deletions runtime/src/iree-amd-aie/driver/xrt/native_executable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,20 +180,20 @@ iree_status_t iree_hal_xrt_native_executable_create(
std::unique_ptr<xrt::xclbin> xclbin;
try {
xclbin = std::make_unique<xrt::xclbin>(xclbinVector);
} catch (std::runtime_error& e) {
} catch (std::exception& e) {
return iree_make_status(IREE_STATUS_INTERNAL, "XCLBIN load error: %s",
e.what());
}
try {
device->register_xclbin(*xclbin);
} catch (std::runtime_error& e) {
} catch (std::exception& e) {
return iree_make_status(IREE_STATUS_INTERNAL, "XCLBIN register error: %s",
e.what());
}
xrt::hw_context context;
try {
context = {*device, xclbin->get_uuid()};
} catch (std::runtime_error& e) {
} catch (std::exception& e) {
return iree_make_status(IREE_STATUS_INTERNAL,
"xrt::hw_context context: %s", e.what());
}
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/iree-amd-aie/driver/xrt/xrt_driver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ static void iree_hal_xrt_driver_destroy(iree_hal_driver_t* base_driver) {
iree_allocator_free(host_allocator, driver);

IREE_TRACE_ZONE_END(z0);
return;
}

static iree_status_t iree_hal_xrt_driver_dump_device_info(
iree_hal_driver_t* base_driver, iree_hal_device_id_t device_id,
iree_string_builder_t* builder) {
Expand Down

0 comments on commit 767c9c4

Please sign in to comment.