Skip to content

Commit 563c6fa

Browse files
committed
slice start==stop
1 parent 0f97f26 commit 563c6fa

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

extern/cuda/nccl/src/nccl_warper.cc

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@ nccl_initer() {
2727
int device_count = get_device_count();
2828
if (!device_count) return;
2929
if (!inside_mpi) return;
30-
if (mpi_world_rank == 0)
31-
checkCudaErrors(ncclGetUniqueId(&id));
32-
MPI_CHECK(MPI_Bcast((void *)&id, sizeof(id), MPI_BYTE, 0, MPI_COMM_WORLD));
3330
if (mpi_local_rank >= device_count)
3431
LOGf << "mpi_local_rank(">>mpi_local_rank>>") is larger than device_count("
3532
>>device_count>>")";
@@ -39,6 +36,9 @@ nccl_initer() {
3936
event_queue.run_sync([]() {
4037
checkCudaErrors(cudaSetDevice(nccl_device_id));
4138
});
39+
if (mpi_world_rank == 0)
40+
checkCudaErrors(ncclGetUniqueId(&id));
41+
MPI_CHECK(MPI_Bcast((void *)&id, sizeof(id), MPI_BYTE, 0, MPI_COMM_WORLD));
4242
checkCudaErrors(ncclCommInitRank(&comm, mpi_world_size, id, mpi_world_rank));
4343
}
4444

python/jittor/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# This file is subject to the terms and conditions defined in
88
# file 'LICENSE.txt', which is part of this source code package.
99
# ***************************************************************
10-
__version__ = '1.2.0.2'
10+
__version__ = '1.2.0.3'
1111
from . import lock
1212
with lock.lock_scope():
1313
from . import compiler

python/jittor_utils/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ def in_ipynb():
8888

8989
@contextlib.contextmanager
9090
def simple_timer(name):
91-
LOG.i("Timer start", name)
91+
print("Timer start", name)
9292
now = time.time()
9393
yield
94-
LOG.i("Time stop", name, time.time()-now)
94+
print("Time stop", name, time.time()-now)
9595

9696
@contextlib.contextmanager
9797
def import_scope(flags):

src/misc/nano_vector.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ struct Slice {
3939
}
4040
if (start<0) start += size;
4141
mask = 0;
42-
ASSERT(start>=0 && stop>=-1 && start<size && stop<=size)
42+
ASSERT(start==step || (start>=0 && stop>=-1 && start<size && stop<=size))
4343
<< "slice overflow:" << start << stop << step;
4444
}
4545
};

0 commit comments

Comments
 (0)