nvexec(continues_on): basic transition#2031
nvexec(continues_on): basic transition#2031romintomasetti wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
|
thanks for the test cases. the stream scheduler has a curious history. it was written several years ago by a coworker who is a CUDA ninja, but was new to all this is to say, if anybody has an interest in digging into this, they would have my undying gratitude. i agree the current situation is unsatisfactory. |
|
The issue appears to be caused by a double call to Once in the And then once more in This patch avoids the seg fault in my build: (It seems I can't push directly with a commit to the branch). |
|
I confirm that @maartenarnst 's fix works. I'll push it. |
1197848 to
4a7c4d2
Compare
Signed-off-by: romintomasetti <romin.tomasetti@gmail.com> Signed-off-by: Maarten Arnst <maarten.arnst@uliege.be> Signed-off-by: romintomasetti <romin.tomasetti@gmail.com>
4a7c4d2 to
ace3bba
Compare
|
The following still segfaults (switching from one context to another): TEST_CASE("continues on a different context instance", "[cuda][stream][adaptors][continues_on]")
{
nvexec::stream_context ctx_A, ctx_B;
auto sndr = STDEXEC::just()
| STDEXEC::continues_on(ctx_A.get_scheduler())
| STDEXEC::continues_on(ctx_B.get_scheduler());
STDEXEC::sync_wait(std::move(sndr));
}@ericniebler It's probably fine to merge this PR as a first step, i.e. it fixes the transition "to itself". |
|
/ok to test ace3bba |
On the machines I could test, very basic transitions with
nvexec::strean_contextnever work (it segfaults).I already flagged this in:
nvexec::stream_contextto another seg faults #1563@ericniebler I haven't looked for a fix, but this bug seems quite important to fix. Feel free to work with this branch, I won't touch anymore 😉
For the record, here is the stack trace reported by
cuda-gdb: output.log.