"src/vscode:/vscode.git/clone" did not exist on "664e931bcbddd47c21c3d4d547221506f588b9e9"
Commit bd6e66df authored by Kexin Yu's avatar Kexin Yu
Browse files

initialize on device

parent 9033ad58
......@@ -117,7 +117,7 @@ class FusedLAMB(torch.optim.Optimizer):
else:
raise RuntimeError('FusedLAMB only support fp16 and fp32.')
g_norm_32, g_norm_16 = torch.zeros(1), torch.zeros(1)
g_norm_32, g_norm_16 = torch.zeros(1, device='cuda'), torch.zeros(1, device='cuda')
# compute grad norm for two lists
if len(g_all_32) > 0:
g_norm_32 = multi_tensor_applier(self.multi_tensor_l2norm,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment