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

Method forward

DeepSpeedExample/megatron/fp16/fp16.py:73–74  ·  view source on GitHub ↗
(self, *inputs, **kwargs)

Source from the content-addressed store, hash-verified

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))
75
76 def state_dict(self, destination=None, prefix='', keep_vars=False):
77 return self.module.state_dict(destination, prefix, keep_vars)

Callers

nothing calls this directly

Calls 2

fp16_to_fp32Function · 0.85
fp32_to_fp16Function · 0.85

Tested by

no test coverage detected