reorder operations
This commit is contained in:
parent
2e3d229597
commit
c9c4e1f077
1 changed files with 6 additions and 1 deletions
|
@ -8936,12 +8936,17 @@ static void llama_model_quantize_internal(const std::string & fname_inp, const s
|
||||||
return hpx::make_ready_future<void>();
|
return hpx::make_ready_future<void>();
|
||||||
};
|
};
|
||||||
|
|
||||||
hpx::future<void> this_fut = computefn(0, counters[0], thread_local_hist, local_sizes);
|
|
||||||
for (int it = 1; it < nthread_use - 1; ++it) {
|
for (int it = 1; it < nthread_use - 1; ++it) {
|
||||||
futures.push_back(hpx::run_as_hpx_thread(computefn, it, counters[it], thread_local_hist, local_sizes));
|
futures.push_back(hpx::run_as_hpx_thread(computefn, it, counters[it], thread_local_hist, local_sizes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hpx::future<void> this_fut =
|
||||||
|
computefn(0, counters[0], thread_local_hist, local_sizes);
|
||||||
|
|
||||||
hpx::wait_all(futures);
|
hpx::wait_all(futures);
|
||||||
|
|
||||||
this_fut.wait();
|
this_fut.wait();
|
||||||
|
|
||||||
for(auto & local_hist : thread_local_hist) {
|
for(auto & local_hist : thread_local_hist) {
|
||||||
for(auto j = 0; j < int(local_hist.size()); ++j) {
|
for(auto j = 0; j < int(local_hist.size()); ++j) {
|
||||||
hist_cur[j] += local_hist[j];
|
hist_cur[j] += local_hist[j];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue