|
1 |
| -# RUN: %PYTHON %s 2>&1 | FileCheck %s |
| 1 | +# RUN: env MLIR_RUNNER_UTILS=%mlir_runner_utils MLIR_C_RUNNER_UTILS=%mlir_c_runner_utils %PYTHON %s 2>&1 | FileCheck %s |
2 | 2 | # REQUIRES: host-supports-jit
|
3 | 3 | import gc, sys, os, tempfile
|
4 | 4 | from mlir.ir import *
|
|
7 | 7 | from mlir.runtime import *
|
8 | 8 | from ml_dtypes import bfloat16, float8_e5m2
|
9 | 9 |
|
| 10 | +MLIR_RUNNER_UTILS = os.getenv( |
| 11 | + "MLIR_RUNNER_UTILS", "../../../../lib/libmlir_runner_utils.so" |
| 12 | +) |
| 13 | +MLIR_C_RUNNER_UTILS = os.getenv( |
| 14 | + "MLIR_C_RUNNER_UTILS", "../../../../lib/libmlir_c_runner_utils.so" |
| 15 | +) |
10 | 16 |
|
11 | 17 | # Log everything to stderr and flush so that we have a unified stream to match
|
12 | 18 | # errors/info emitted by MLIR to stderr.
|
@@ -700,8 +706,8 @@ def testSharedLibLoad():
|
700 | 706 | ]
|
701 | 707 | else:
|
702 | 708 | shared_libs = [
|
703 |
| - "../../../../lib/libmlir_runner_utils.so", |
704 |
| - "../../../../lib/libmlir_c_runner_utils.so", |
| 709 | + MLIR_RUNNER_UTILS, |
| 710 | + MLIR_C_RUNNER_UTILS, |
705 | 711 | ]
|
706 | 712 |
|
707 | 713 | execution_engine = ExecutionEngine(
|
@@ -743,8 +749,8 @@ def testNanoTime():
|
743 | 749 | ]
|
744 | 750 | else:
|
745 | 751 | shared_libs = [
|
746 |
| - "../../../../lib/libmlir_runner_utils.so", |
747 |
| - "../../../../lib/libmlir_c_runner_utils.so", |
| 752 | + MLIR_RUNNER_UTILS, |
| 753 | + MLIR_C_RUNNER_UTILS, |
748 | 754 | ]
|
749 | 755 |
|
750 | 756 | execution_engine = ExecutionEngine(
|
|
0 commit comments