Created
August 23, 2024 21:47
-
-
Save apivovarov/bbaf7d595449f3d2f3565e776d1a8d23 to your computer and use it in GitHub Desktop.
[torch_xla] convert hlo.pb to text hlo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch_xla.core.xla_builder as xb | |
fname = "model.hlo.pb" | |
with open(fname, mode="rb") as f: | |
comp = xb.computation_from_module_proto("foo", f.read()) | |
print(xb.get_computation_hlo(comp)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment