File tree Expand file tree Collapse file tree 2 files changed +0
-42
lines changed Expand file tree Collapse file tree 2 files changed +0
-42
lines changed Original file line number Diff line number Diff line change 14
14
// ===----------------------------------------------------------------------===//
15
15
16
16
#include " mlir/ExecutionEngine/RunnerUtils.h"
17
- #include < chrono>
18
17
19
18
extern " C" void
20
19
_mlir_ciface_print_memref_shape_i8 (UnrankedMemRefType<int8_t > *M) {
@@ -76,14 +75,6 @@ extern "C" void _mlir_ciface_print_memref_f64(UnrankedMemRefType<double> *M) {
76
75
impl::printMemRef (*M);
77
76
}
78
77
79
- extern " C" int64_t _mlir_ciface_nano_time () {
80
- auto now = std::chrono::high_resolution_clock::now ();
81
- auto duration = now.time_since_epoch ();
82
- auto nanoseconds =
83
- std::chrono::duration_cast<std::chrono::nanoseconds>(duration);
84
- return nanoseconds.count ();
85
- }
86
-
87
78
extern " C" void print_memref_i32 (int64_t rank, void *ptr) {
88
79
UnrankedMemRefType<int32_t > descriptor = {rank, ptr};
89
80
_mlir_ciface_print_memref_i32 (&descriptor);
Original file line number Diff line number Diff line change @@ -358,36 +358,3 @@ def testSharedLibLoad():
358
358
359
359
360
360
run (testSharedLibLoad )
361
-
362
-
363
- # Test that nano time clock is available.
364
- # CHECK-LABEL: TEST: testNanoTime
365
- def testNanoTime ():
366
- with Context ():
367
- module = Module .parse ("""
368
- module {
369
- func @main() attributes { llvm.emit_c_interface } {
370
- %now = call @nano_time() : () -> i64
371
- %memref = memref.alloca() : memref<1xi64>
372
- %c0 = arith.constant 0 : index
373
- memref.store %memref[%c0] : memref<1xi64>
374
- call @print_memref_i64(%memref) : (memref<*xi64) -> ()
375
- return
376
- }
377
- func private @nano_time() -> i64 attributes { llvm.emit_c_interface }
378
- func private @print_memref_i64(memref<*xi64>) attributes { llvm.emit_c_interface }
379
- }""" )
380
-
381
- execution_engine = ExecutionEngine (
382
- lowerToLLVM (module ),
383
- opt_level = 3 ,
384
- shared_libs = [
385
- "../../../../lib/libmlir_runner_utils.so" ,
386
- "../../../../lib/libmlir_c_runner_utils.so"
387
- ])
388
- execution_engine .invoke ("main" , arg0_memref_ptr )
389
- # CHECK: Unranked Memref
390
- # CHECK: [{{.*}}]
391
-
392
-
393
- run (testNanoTime )
You can’t perform that action at this time.
0 commit comments