Skip to content

Commit

Permalink
undo even more hacks
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Aug 22, 2024
1 parent c85d95a commit 6df5792
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ void AMDAIEDialect::initializeAMDAIEAttrs() {
addAttributes<
#define GET_ATTRDEF_LIST
#include "iree-amd-aie/IR/AMDAIEAttrs.cpp.inc" // IWYU pragma: keeep

>();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ LogicalResult runTool(
std::optional<sys::ProcessStatistics> optStats(stats);
int result = sys::ExecuteAndWait(program, pArgs, envSmallVec,
/* redirects */ redirects,
/*SecondsToWait*/ 10, /*MemoryLimit*/ 0,
/*SecondsToWait*/ 0, /*MemoryLimit*/ 0,
&errMsg, &executionFailed, &optStats);

#ifndef _WIN32
Expand Down
6 changes: 1 addition & 5 deletions runtime/src/iree-amd-aie/aie_runtime/iree_aie_configure.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
#include "iree_aie_router.h"
#include "iree_aie_runtime.h"
#include "llvm/ADT/StringExtras.h"
#ifdef _WIN32
#include "llvm/Support/Windows/WindowsSupport.h"
#endif

#define DEBUG_TYPE "iree-aie-cdo-emitter"

Expand Down Expand Up @@ -213,8 +210,7 @@ LogicalResult pushToBdQueueAndEnable(const AMDAIEDeviceModel &deviceModel,
}

LogicalResult addElfToTile(const AMDAIEDeviceModel &deviceModel,
const TileLoc &tileLoc, Path &elfPath,
bool aieSim) {
const TileLoc &tileLoc, 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
10 changes: 4 additions & 6 deletions runtime/src/iree-amd-aie/driver/xrt/xrt_driver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,16 @@ iree_status_t iree_hal_xrt_driver_create_internal(
(char*)driver + iree_sizeof_struct(*driver));
driver->device_params = *device_params;

int device_count;
try {
device_count = xrt::system::enumerate_devices();
if (IREE_UNLIKELY(xrt::system::enumerate_devices() == 0)) {
return iree_make_status(IREE_STATUS_FAILED_PRECONDITION,
"No XRT devices found");
}
} catch (std::runtime_error& e) {
return iree_make_status(IREE_STATUS_INTERNAL,
"xrt::system::enumerate_devices failed: %s",
e.what());
}
if (IREE_UNLIKELY(device_count == 0)) {
return iree_make_status(IREE_STATUS_FAILED_PRECONDITION,
"No XRT devices found");
}
// Get handle to xrt device
try {
global_device = xrt::device(0);
Expand Down

0 comments on commit 6df5792

Please sign in to comment.