(names)
| 51 | temp = utils.tempdir() |
| 52 | |
| 53 | def save_object(names): |
| 54 | n = te.size_var("n") |
| 55 | Ab = tvm.tirx.decl_buffer((n,), dtype) |
| 56 | i = te.var("i") |
| 57 | # for i in 0 to n-1: |
| 58 | stmt = tvm.tirx.For( |
| 59 | i, |
| 60 | 0, |
| 61 | n - 1, |
| 62 | tvm.tirx.ForKind.SERIAL, |
| 63 | tvm.tirx.BufferStore(Ab, tvm.tirx.BufferLoad(Ab, [i]) + 1, [i + 1]), |
| 64 | ) |
| 65 | mod = tvm.IRModule.from_expr( |
| 66 | tvm.tirx.PrimFunc([Ab], stmt).with_attr("global_symbol", "main") |
| 67 | ) |
| 68 | m = tvm.tirx.build(mod, target=target) |
| 69 | for name in names: |
| 70 | m.write_to_file(name) |
| 71 | |
| 72 | path_obj = temp.relpath("test.o") |
| 73 | path_ll = temp.relpath("test.ll") |
no test coverage detected
searching dependent graphs…