Skip to content

Commit

Permalink
Add the map IREE type ASM -> torch dtype (#451)
Browse files Browse the repository at this point in the history
Signed-off-by: Boian Petkantchin <[email protected]>
  • Loading branch information
sogartar authored Feb 4, 2025
1 parent 80fe058 commit 915d24c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions iree/turbine/support/conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@
torch.float8_e5m2fnuz: "f8E5M2FNUZ",
}

IREE_TYPE_ASM_TO_TORCH_DTYPE = dict(
(v, k) for k, v in TORCH_DTYPE_TO_IREE_TYPE_ASM.items()
)

DTYPE_TO_ELEMENT_TYPE: dict[torch.dtype, HalElementType] = {
torch.float16: HalElementType.FLOAT_16,
torch.bfloat16: HalElementType.BFLOAT_16,
Expand Down

0 comments on commit 915d24c

Please sign in to comment.