Created
August 23, 2024 21:47
-
-
Save apivovarov/bbaf7d595449f3d2f3565e776d1a8d23 to your computer and use it in GitHub Desktop.
Revisions
-
apivovarov created this gist
Aug 23, 2024 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ 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))