mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-11 05:49:55 +00:00
[autoparallel] add experimental view handler (#2011)
* [autoparallel] add experimental view handler * polish * polish * polish code * rename variables
This commit is contained in:
@@ -51,6 +51,8 @@ class OperationData:
|
||||
"""
|
||||
if isinstance(data, torch.Tensor):
|
||||
return data.shape
|
||||
elif isinstance(data, torch.Size):
|
||||
return None
|
||||
elif isinstance(data, (tuple, list)):
|
||||
data_type = type(data)
|
||||
return data_type([_infer_logical_shape(d) for d in data])
|
||||
|
Reference in New Issue
Block a user