Skip to content

Commit 8258c61

Browse files
committed
update readme
1 parent b5d9008 commit 8258c61

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,10 @@ Session::setStreams(4); // create 4 strems
411411
```
412412
Then, you can use `setStreamIdx` to select a stream to go with your instance of `DTensor`
413413
```c++
414-
auto a = DTensor<double>::createRandomTensor(3, 6, 4, -1, 1).setStreamIdx(2);
414+
auto a = DTensor<double>::createRandomTensor(3, 6, 4, -1, 1).setStreamIdx(0);
415+
auto b = DTensor<double>::createRandomTensor(3, 6, 4, -1, 1).setStreamIdx(1);
416+
// do stuff...
417+
Session::getInstance().synchronizeAllStreams();
415418
```
416419

417420
## Happy number crunching!

0 commit comments

Comments
 (0)