mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2026-05-08 14:46:09 +00:00
[kernel] move all symlinks of kernel to colossalai._C (#1971)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import math
|
||||
|
||||
import torch
|
||||
|
||||
from colossalai.testing import parameterize
|
||||
@@ -66,8 +67,8 @@ def test_cpu_adam(adamw, step, p_dtype, g_dtype):
|
||||
exp_avg_sq_copy = exp_avg_sq.clone()
|
||||
|
||||
try:
|
||||
import cpu_adam
|
||||
cpu_adam_op = cpu_adam.CPUAdamOptimizer(lr, beta1, beta2, eps, weight_decay, adamw)
|
||||
import colossalai._C.cpu_optim
|
||||
cpu_adam_op = colossalai._C.cpu_optim.CPUAdamOptimizer(lr, beta1, beta2, eps, weight_decay, adamw)
|
||||
except:
|
||||
raise ImportError("Import cpu adam error, please install colossal from source code")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user