Skip to content

Commit d4a69d8

Browse files
Removes outdated alignment warning, adds CMake debug preset
Removes an old warning about incorrect alignment of inputs to the TensorRT engine. Also adds a new debug preset for CMake that can be used with `build_wheels.sh`.
1 parent 3c4d177 commit d4a69d8

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

mlir-tensorrt/CMakePresets.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,21 @@
100100
"MLIR_TRT_ENABLE_NCCL": "OFF",
101101
"MLIR_TRT_DOWNLOAD_TENSORRT_VERSION": "$env{DOWNLOAD_TENSORRT_VERSION}"
102102
}
103+
},
104+
{
105+
"name": "ninja-debug-wheels",
106+
"displayName": "Ninja debug wheels",
107+
"generator": "Ninja",
108+
"binaryDir": "build",
109+
"inherits": "ninja-gcc",
110+
"cacheVariables": {
111+
"LLVM_ENABLE_ASSERTIONS": "OFF",
112+
"CMAKE_BUILD_TYPE": "Debug",
113+
"CMAKE_PLATFORM_NO_VERSIONED_SONAME": "ON",
114+
"LLVM_MINIMUM_PYTHON_VERSION": "$env{PY_VERSION}",
115+
"MLIR_TRT_ENABLE_NCCL": "OFF",
116+
"MLIR_TRT_DOWNLOAD_TENSORRT_VERSION": "$env{DOWNLOAD_TENSORRT_VERSION}"
117+
}
103118
}
104119
]
105-
}
120+
}

mlir-tensorrt/executor/lib/Runtime/Backend/Lua/Modules/TensorRT/TensorRTModule.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -477,12 +477,6 @@ static Status setTensorAddressesOrReport(
477477
ADD_TENSORRT_MODULE_RANGE("set_tensor_addresses");
478478
unsigned idx = 0;
479479
for (auto &[name, ptr, dims] : buffers) {
480-
constexpr intptr_t kMinAlignmentBytes = 256;
481-
if (ptr % kMinAlignmentBytes != 0)
482-
MTRT_WARNV("TensorRT input {0} (ptr = {1:X}) does not meet minimum "
483-
"alignment of {2} bytes",
484-
name, ptr, kMinAlignmentBytes);
485-
486480
bool result =
487481
context->setTensorAddress(name.c_str(), reinterpret_cast<void *>(ptr));
488482

0 commit comments

Comments
 (0)