Skip to content

Commit

Permalink
[fx] added ndim property to proxy (hpcaitech#1253)
Browse files Browse the repository at this point in the history
FrankLeeeee authored Jul 12, 2022
1 parent 4a09fc0 commit fb35460
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions colossalai/fx/proxy.py
Original file line number Diff line number Diff line change
@@ -57,6 +57,10 @@ def shape(self):
self._assert_meta_data_is_tensor()
return self.meta_data.shape

@property
def ndim(self):
return self.dim()

def dim(self):
self._assert_meta_data_is_tensor()
return self.meta_data.dim()

0 comments on commit fb35460

Please sign in to comment.