Skip to content

Commit

Permalink
unique feature timing
Browse files Browse the repository at this point in the history
  • Loading branch information
Roger Waleffe authored and Roger Waleffe committed Nov 21, 2023
1 parent 7c5dc2d commit 0edaaa0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/cpp/src/data/dataloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,8 @@ void DataLoader::loadCPUParameters(shared_ptr<Batch> batch) {
// << batch->sub_batches_[i]->unique_node_indices_.device() << "\n";
}

Timer t = new Timer(false);
t.start();
// std::cout << "cat\n";
torch::Tensor all_unique_nodes = torch::cat({all_unique_nodes_vec}, 0);
// std::cout << all_unique_nodes.sizes() << "\n";
Expand All @@ -676,6 +678,8 @@ void DataLoader::loadCPUParameters(shared_ptr<Batch> batch) {
// std::cout << inverse.sizes() << " " << inverse.device() << "\n";
// std::cout << unique_features.sizes() << " " << unique_features.device() << "\n";
std::cout<<unique_indices.size(0)<<" vs " <<all_unique_nodes.size(0)<<"\n";
t.stop();
std::cout<<"uniques: "<<t.getDuration()<<"\n";

// std::cout << "end cat\n";
int count = 0;
Expand Down

0 comments on commit 0edaaa0

Please sign in to comment.