Commit a092db6d authored by Ducky's avatar Ducky
Browse files

Add clean-up, add more debugging spam

parent ee5d2f19
......@@ -1210,6 +1210,13 @@ public:
*/
int dependency_left;
/**
* Debugging Helpers
*/
const char* name() {
return lhs->parent->name;
}
protected:
tCTF_TensorOperationTypes op;
tCTF_Idx_Tensor<dtype>* lhs;
......
......@@ -45,8 +45,6 @@ void tCTF_Schedule<dtype>::partition_and_execute() {
MPI_Comm_rank(world->comm, &rank);
MPI_Comm_size(world->comm, &size);
std::cout << rank << " / " << size << " partition_execute" << std::endl;
// Partition operations into worlds, and do split
std::vector<tCTF_PartitionOps<dtype> > comm_ops; // operations for each subcomm
int my_color = rank % ready_tasks.size();
......@@ -100,7 +98,7 @@ void tCTF_Schedule<dtype>::partition_and_execute() {
// Run my tasks
if (comm_ops.size() > my_color) {
for (auto &op : comm_ops[my_color].ops) {
std::cout << rank << "Exec" << std::endl;
std::cout << rank << "Exec " << op->name() << std::endl;
op->execute(&comm_ops[my_color].remap);
}
}
......@@ -112,6 +110,14 @@ void tCTF_Schedule<dtype>::partition_and_execute() {
}
}
// Clean up local tensors & world
if (comm_ops.size() > my_color) {
for (auto &local_tensor : comm_ops[my_color].local_tensors) {
delete local_tensor;
}
delete comm_ops[my_color].world;
}
// Update ready tasks
for (auto &comm_op : comm_ops) {
for (auto &op : comm_op.ops) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment