Skip to content

Commit

Permalink
faster network test
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Waleffe authored and Roger Waleffe committed Nov 22, 2023
1 parent eb516eb commit 8251fe7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cpp/src/common/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ torch::Tensor transfer_tensor(torch::Tensor input, torch::Device device, CudaStr
#ifdef MARIUS_CUDA
if (device.is_cuda() || input.device().is_cuda()) {
if (compute_stream != nullptr) input.record_stream(*compute_stream);
if (transfer_stream != nullptr) input.record_stream(*transfer_stream);
// if (transfer_stream != nullptr) input.record_stream(*transfer_stream);
}
#endif
}
Expand Down
2 changes: 1 addition & 1 deletion src/cpp/src/pipeline/pipeline_gpu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

void batchToDevice(Pipeline* pipeline_, shared_ptr<Batch> batch) {
if (batch->sub_batches_.size() > 0) {
// #pragma omp parallel for
#pragma omp parallel for
for (int i = 0; i < batch->sub_batches_.size(); i++) {
batch->sub_batches_[i]->to(pipeline_->model_->device_models_[i]->device_, pipeline_->dataloader_->compute_streams_[i]);
}
Expand Down

0 comments on commit 8251fe7

Please sign in to comment.