MCPcopy Create free account
hub / github.com/AIS-SNU/Smart-Infinity / __init__

Method __init__

DeepSpeedExample/megatron/fp16/fp16.py:69–71  ·  view source on GitHub ↗
(self, module)

Source from the content-addressed store, hash-verified

67
68class FP16_Module(MegatronModule):
69 def __init__(self, module):
70 super(FP16_Module, self).__init__()
71 self.add_module('module', module.half())
72
73 def forward(self, *inputs, **kwargs):
74 return fp16_to_fp32(self.module(*(fp32_to_fp16(inputs)), **kwargs))

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected