sycl: keep the null-stream sentinel a sentinel in Verifier (#1555)
dpct migrated cudaStream_t ext_stream_ = nullptr to a pointer to the in-order queue, evaluated at construction on whichever device is current. Two places then misread it: init() compared ext_stream_ against the *init-time* device's in-order queue, so a stage built on one device and init'ed on another adopted the constructing device's queue (cross-context submit failures, UR_RESULT_ERROR_DEVICE_LOST); teardown's 'cs_ != ext_stream_' ownership test drifted the same way. Restore the CUDA contract: nullptr means 'no stream until set_stream()', matching include/strata/core/verify.hpp:319 and src/core/verify.cpp:604.
This commit is contained in:
1 parent
0b063ce804
commit
9aba7baa28
2 files changed
+4
-4
No files matched your search
@@ -303,9 +303,9 @@ private:
|
||||
void collect_profile(); ///< STRATA_VERIFY_PROFILE: add the last window's stamps to prof_sum_
|
||||
void accumulate_profile(const unsigned long long* stamps); ///< one window's stamps (host copy) into prof_sum_
|
||||
// pipelined windows (pl_launch ...)
|
||||
dpct::queue_ptr ext_stream_ =
|
||||
&dpct::get_in_order_queue(); ///< set_stream: the stage's shared stream
|
||||
///< (not destroyed here)
|
||||
dpct::queue_ptr ext_stream_ = nullptr; ///< set_stream: the stage's shared stream (not destroyed here);
|
||||
///< nullptr = none until set_stream() (#1555: a queue pointer captured
|
||||
///< at construction would be the *constructing* device's)
|
||||
bool always_publish_ = false;
|
||||
void pl_stage(int T, const int32_t* tokens, int64_t pos0, const int32_t ple_prev[2]);
|
||||
dpct::event_ptr ev_done_ = nullptr, ev_commit_ = nullptr;
|
||||
|
||||
@@ -602,7 +602,7 @@ bool Verifier::init(const WeightTable &wt, const ModelGeometry &g,
|
||||
err = "verify: copy stream create failed";
|
||||
return false;
|
||||
}
|
||||
if (ext_stream_ != &dpct::get_in_order_queue()) cs_ =
|
||||
if (ext_stream_ != nullptr) cs_ =
|
||||
ext_stream_; // set_stream (pipelined windows): the stage's shared
|
||||
// stream
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user