mirror of https://github.com/hpcaitech/ColossalAI
[NFC] polish colossalai/nn/layer/colossalai_layer/linear.py (#1556)
parent
46931e3c32
commit
7cc052f6c0
|
@ -81,7 +81,8 @@ class Linear(ColossalaiModule):
|
||||||
else:
|
else:
|
||||||
linear_cls = _parallel_linear[tensor_parallel]
|
linear_cls = _parallel_linear[tensor_parallel]
|
||||||
gather_output = kwargs.pop('gather_output', None)
|
gather_output = kwargs.pop('gather_output', None)
|
||||||
if 'gather_output' in inspect.signature(linear_cls.__init__).parameters.keys(): # gather_out arg is available
|
if 'gather_output' in inspect.signature(
|
||||||
|
linear_cls.__init__).parameters.keys(): # gather_out arg is available
|
||||||
kwargs['gather_output'] = gather_output
|
kwargs['gather_output'] = gather_output
|
||||||
layer = linear_cls(
|
layer = linear_cls(
|
||||||
in_features,
|
in_features,
|
||||||
|
|
Loading…
Reference in New Issue