()
| 34 | current_batch_devs: list[Compiled] = [] |
| 35 | |
| 36 | def flush_batch(): |
| 37 | nonlocal current_batch, current_batch_devs, max_batch_size, new_src |
| 38 | if len(current_batch) <= 1 and not getenv("GRAPH_ONE_KERNEL"): new_src.extend(current_batch) |
| 39 | else: |
| 40 | new_src.append(create_graph_call(current_batch)) |
| 41 | max_batch_size *= 2 |
| 42 | if DEBUG >= 2: print(f"JIT GRAPHing batch with {len(current_batch)} kernels") |
| 43 | current_batch, current_batch_devs = [], [] |
| 44 | |
| 45 | for si in linear.src: |
| 46 | if si.src[0].op is Ops.BUFFER_VIEW: continue |
no test coverage detected
searching dependent graphs…