(layout: torch.layout)
| 318 | |
| 319 | |
| 320 | def layout_enum(layout: torch.layout) -> int: |
| 321 | # TODO single source of truth. |
| 322 | table = { |
| 323 | torch.strided: 0, |
| 324 | torch.sparse_coo: 1, |
| 325 | } |
| 326 | return table[layout] |
| 327 | |
| 328 | |
| 329 | def make_allocation_info(mem_id: int, mem_offset: int) -> schema.AllocationDetails: |
no outgoing calls
no test coverage detected