diff --git a/python/jittor/__init__.py b/python/jittor/__init__.py index 068cc7b2..645a65d0 100644 --- a/python/jittor/__init__.py +++ b/python/jittor/__init__.py @@ -8,7 +8,7 @@ # This file is subject to the terms and conditions defined in # file 'LICENSE.txt', which is part of this source code package. # *************************************************************** -__version__ = '1.2.2.43' +__version__ = '1.2.2.44' from . import lock with lock.lock_scope(): ori_int = int diff --git a/python/jittor/compile_extern.py b/python/jittor/compile_extern.py index 68f2ed8f..d1f3b62d 100644 --- a/python/jittor/compile_extern.py +++ b/python/jittor/compile_extern.py @@ -271,6 +271,7 @@ def setup_cutt(): def install_nccl(root_folder): url = "https://github.com/NVIDIA/nccl/archive/v2.8.4-1.tar.gz" + url = "https://codeload.github.com/NVIDIA/nccl/tar.gz/v2.8.4-1" filename = "nccl.tgz" fullname = os.path.join(root_folder, filename) diff --git a/python/jittor/misc.py b/python/jittor/misc.py index 671f9f20..13e5aad8 100644 --- a/python/jittor/misc.py +++ b/python/jittor/misc.py @@ -897,7 +897,7 @@ def auto_parallel(n, src, **kw): tid_def += f"\nauto tnum{i} = 1<>tn{i};" for i in range(n): - tid_loop += f"\nfor (int i{i}=tid{i}; i{i}<{pnargs2[i]}; i{i}+=tn{i})" + tid_loop += f"\nfor (int i{i}=tid{i}; i{i}<{pnargs2[i]}; i{i}+=tnum{i})" call_args.append(pnargs2[i]) call_args.append(f"i{i}") call_args += oargs2 diff --git a/python/jittor/nn.py b/python/jittor/nn.py index c766bed9..e299743f 100644 --- a/python/jittor/nn.py +++ b/python/jittor/nn.py @@ -1053,8 +1053,10 @@ def upsample(img, size, mode="nearest", align_corners=False): x = (hid + 0.5) * (h / H) - 0.5 y = (wid + 0.5) * (w / W) - 0.5 else: - x = hid * (h / H) - y = wid * (w / W) + x = hid * (h / H) + (h / H * 0.5 - 0.5) + if H > h: x = x.clamp(0, h - 1) + y = wid * (w / W) + (w / W * 0.5 - 0.5) + if W > w: y = y.clamp(0, w - 1) return _interpolate(img, x, y, (nid, cid), mode)