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

Method launch

engine/src/split/src/df2_bridge.cpp:115–127  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113}
114
115bool Bridge::launch(int lane, int n_new, int64_t pos0, int anchor, std::string& err) {
116 Impl& I = *p_;
117 cudaSetDevice(I.device);
118 std::vector<float>& a = I.anchor[(size_t) lane];
119 I.embed(anchor, a.data());
120 // row 0 of the lane's block staging (the rest stays the mask row); ordered before the graph on the drafter's own stream
121 if (cudaMemcpyAsync(I.stage[(size_t) lane], a.data(), a.size() * 4, cudaMemcpyHostToDevice, I.d[(size_t) lane]->stream()) != cudaSuccess) {
122 err = "dflash2: the anchor's embedding upload";
123 return false;
124 }
125 Dflash2Drafter& d = *I.d[(size_t) lane];
126 return d.draft_launch(d.landing(), n_new, pos0, anchor, err);
127}
128
129bool Bridge::finish(int lane, int32_t* drafts, float* probs, std::string& err) { return p_->d[(size_t) lane]->draft_finish(drafts, probs, err); }
130void Bridge::reset(int lane) { p_->d[(size_t) lane]->reset(); }

Callers

nothing calls this directly

Calls 8

draft_launchMethod · 0.80
cudaSetDeviceFunction · 0.50
cudaMemcpyAsyncFunction · 0.50
embedMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45
streamMethod · 0.45
landingMethod · 0.45

Tested by

no test coverage detected