Skip to content

Commit

Permalink
Add support for immutable list (pytorch#3811)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#3811

Added the support for the immutable list
- The changes is in the PyTorch fx graph building framework.
- To build a GPU/Vulkan graph, previously there is no support for the immutable list

bypass-github-export-checks
bypass-github-pytorch-ci-checks
bypass-github-executorch-ci-checks

Reviewed By: copyrightly, derekxu

Differential Revision: D58028346

fbshipit-source-id: c96731bb6f9e4c00d1afbf57def4b7fd93a20f59
  • Loading branch information
Yujie Hui authored and facebook-github-bot committed Jun 3, 2024
1 parent 3b5bb00 commit 8523db5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions backends/vulkan/serialization/vulkan_graph_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,9 @@ def get_or_create_value_for(self, arg: _Argument):
return self.create_scalar_list_value(arg)
elif isinstance(arg, list) and isinstance(arg[0], Node):
return self.create_value_list_value(arg)
elif isinstance(arg, torch.fx.immutable_collections.immutable_list):
# pyre-ignore[6]
return self.create_value_list_value(arg)
elif isinstance(arg, str):
return self.create_string_value(arg)
else:
Expand Down

0 comments on commit 8523db5

Please sign in to comment.