fix ci bug

This commit is contained in:
Dun Liang 2020-05-21 22:22:28 +08:00
parent 126f92a6f3
commit af2a9230f7
6 changed files with 8 additions and 3 deletions

View File

@ -185,7 +185,7 @@ void CudnnConvBackwardWOp::jit_run() {
jk.clear();
jk << dimX[0] << "," << dimX[1] << "," << dimX[2] << "," << dimX[3] << ",";
jk << dimW[0] << "," << dimW[1] << "," << dimW[2] << "," << dimW[3] << ",";
jk << padding << "," <<stride << "," << dilation << ".";
jk << padding << "," <<stride << "," << dilation << "," << groups << ".";
auto iter = bwdw_algo_cache.find(jk.to_string());
if (iter!=bwdw_algo_cache.end()) algo = iter->second;

View File

@ -186,7 +186,7 @@ void CudnnConvBackwardXOp::jit_run() {
jk.clear();
jk << dimX[0] << "," << dimX[1] << "," << dimX[2] << "," << dimX[3] << ",";
jk << dimW[0] << "," << dimW[1] << "," << dimW[2] << "," << dimW[3] << ",";
jk << padding << "," <<stride << "," << dilation << ".";
jk << padding << "," <<stride << "," << dilation << "," << groups << ".";
auto iter = bwdx_algo_cache.find(jk.to_string());
if (iter!=bwdx_algo_cache.end()) algo = iter->second;

View File

@ -188,7 +188,7 @@ void CudnnConvOp::jit_run() {
jk.clear();
jk << dimX[0] << "," << dimX[1] << "," << dimX[2] << "," << dimX[3] << ",";
jk << dimW[0] << "," << dimW[1] << "," << dimW[2] << "," << dimW[3] << ",";
jk << padding << "," <<stride << "," << dilation << ".";
jk << padding << "," <<stride << "," << dilation << "," << groups << ".";
auto iter = fwd_algo_cache.find(jk.to_string());
if (iter!=fwd_algo_cache.end()) algo = iter->second;

View File

@ -292,6 +292,9 @@ def setup_nccl():
if nccl_home is None: return
nccl_include_path = os.path.join(nccl_home, "build", "include")
nccl_lib_path = os.path.join(nccl_home, "build", "lib")
if not inside_mpi():
return
nccl_lib_name = os.path.join(nccl_lib_path, "libnccl.so")
assert os.path.isdir(nccl_include_path)

View File

@ -320,6 +320,7 @@ class Conv(Module):
f'i4*{self.stride[0]}-{self.padding[0]}+i6*{self.dilation[0]}', # Hid+Khid
f'i5*{self.stride[1]}-{self.padding[1]}+i7*{self.dilation[1]}', # Wid+KWid
])
xx.compile_options = {"G":G}
# w: [oc, CpG, Kh, Kw]
ww = self.weight.reindex([N, G, oc//G, CpG, oh, ow, Kh, Kw], [
f'i1*{oc//G}+i2',

View File

@ -74,6 +74,7 @@ class test_models(unittest.TestCase):
pytorch_test_img = to_cuda(torch.Tensor(test_img))
jittor_test_img = jt.array(test_img)
for test_model in self.models:
print("test model", test_model)
if test_model == "inception_v3":
test_img = np.random.random((bs,3,300,300)).astype('float32')
pytorch_test_img = to_cuda(torch.Tensor(test_img))