mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-14 13:42:12 +00:00
[misc] update pre-commit and run all files (#4752)
* [misc] update pre-commit * [misc] run pre-commit * [misc] remove useless configuration files * [misc] ignore cuda for clang-format
This commit is contained in:
@@ -2,7 +2,7 @@ from operator import add, floordiv, getitem, mul, neg, pos, setitem, sub
|
||||
|
||||
import torch
|
||||
|
||||
__all__ = ['INPLACE_OPS', 'INPLACE_METHOD', 'NON_INPLACE_METHOD']
|
||||
__all__ = ["INPLACE_OPS", "INPLACE_METHOD", "NON_INPLACE_METHOD"]
|
||||
|
||||
# TODO fill out the inplace ops
|
||||
INPLACE_OPS = [
|
||||
@@ -20,25 +20,25 @@ INPLACE_OPS = [
|
||||
|
||||
# TODO: list all call_methods that are inplace here
|
||||
INPLACE_METHOD = [
|
||||
'transpose',
|
||||
'permute',
|
||||
"transpose",
|
||||
"permute",
|
||||
# TODO: reshape may return a copy of the data if the data is not contiguous
|
||||
'reshape',
|
||||
'dim',
|
||||
'flatten',
|
||||
'size',
|
||||
'view',
|
||||
'unsqueeze',
|
||||
'to',
|
||||
'type',
|
||||
'flatten',
|
||||
"reshape",
|
||||
"dim",
|
||||
"flatten",
|
||||
"size",
|
||||
"view",
|
||||
"unsqueeze",
|
||||
"to",
|
||||
"type",
|
||||
"flatten",
|
||||
]
|
||||
|
||||
# TODO: list all call_methods that are not inplace here
|
||||
NON_INPLACE_METHOD = [
|
||||
'chunk',
|
||||
'contiguous',
|
||||
'expand',
|
||||
'mean',
|
||||
'split',
|
||||
"chunk",
|
||||
"contiguous",
|
||||
"expand",
|
||||
"mean",
|
||||
"split",
|
||||
]
|
||||
|
Reference in New Issue
Block a user