mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-10 21:40:02 +00:00
[autochunk] support vit (#3084)
support vit for autochunk * support some new ops for vit * fix some bugs * add test for vit
This commit is contained in:
@@ -109,8 +109,11 @@ def is_non_compute_node(node: Node) -> bool:
|
||||
return False
|
||||
|
||||
|
||||
def get_node_shape(node: Node) -> List:
|
||||
if get_node_name(node) == "split":
|
||||
def get_node_shape(node: Node) -> Any:
|
||||
"""
|
||||
return node data shape
|
||||
"""
|
||||
if get_node_name(node) in ["split", "unbind"]:
|
||||
return node.meta["tensor_meta"][0].shape
|
||||
if hasattr(node.meta["tensor_meta"], "shape"):
|
||||
return node.meta["tensor_meta"].shape
|
||||
|
Reference in New Issue
Block a user