MCPcopy Create free account
hub / github.com/Niko1221/Strata / done

Method done

engine/src/core/verify.cpp:6897–6915  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6895}
6896
6897bool Verifier::done(std::string& err) {
6898 if (!fl_active_ || fl_k_ < fl_total_) return false;
6899 const OnDevice on_device(device_);
6900 const cudaError_t q = cudaEventQuery(ev_done_);
6901 if (q == cudaErrorNotReady) {
6902 const double now = now_ms();
6903 if (now - fl_flush_ms_ > 2.0) { fl_flush_ms_ = now; (void) cudaStreamQuery(cs_); }
6904 if (now - fl_since_ms_ > 20000.0) { // every layer served, and the graph still runs: #267 as above
6905 err = "verify: the window never finished" + released_note(release_gpu_waits(5000));
6906 }
6907 return false;
6908 }
6909 if (q != cudaSuccess) { err = std::string("verify: ") + cudaGetErrorString(q); return false; }
6910 if (copy_used_) { // no host function of this window may raise flag B in the next one
6911 if (cudaStreamQuery(copy_) == cudaErrorNotReady) return false;
6912 copy_used_ = false;
6913 }
6914 return true;
6915}
6916
6917bool Verifier::pl_finish(int32_t* out, std::string& err) {
6918 using namespace strata::kernels;

Callers 9

mainFunction · 0.45
experts_fileFunction · 0.45
mainFunction · 0.45

Calls 7

cudaStreamQueryFunction · 0.85
release_gpu_waitsFunction · 0.85
now_msFunction · 0.70
released_noteFunction · 0.70
cudaEventQueryFunction · 0.50
stringFunction · 0.50
cudaGetErrorStringFunction · 0.50

Tested by 1

mainFunction · 0.36