cuhk-eda / Xplace

Xplace 2.0: An Extremely Fast, Extensible and Deterministic Placement Framework with Detailed-Routability Optimization
BSD 3-Clause "New" or "Revised" License
97 stars 8 forks source link

Fix bug on `torch==1.13.0+cu117` #2

Closed yuxuan-z19 closed 1 year ago

yuxuan-z19 commented 1 year ago
  1. Fix a little bug while compiling the project with the latest stable PyTorch 1.13.0 (with CUDA 11.7)
home/zyx/Xplace/cpp_to_py/io_parser/gp/GPDatabase.cpp:490:70: error: call of overloaded ‘argsort(at::Tensor, int)’ is ambiguous
  490 |     auto new_order_idx = torch::argsort(hyperedge_index.index({0}), 0);
      |                                                                      ^
...
/home/zyx/Xplace/cpp_to_py/io_parser/gp/GPDatabase.cpp:491:86: error: no matching function for call to ‘at::Tensor::index(<brace-enclosed initializer list>)’
  491 |     hyperedge_index = hyperedge_index.index({torch::indexing::Slice(), new_order_idx});
  1. Add .venv into .gitignore (optional) for those who prefer creating virtualvenv by python -m venv .venv
liulixinkerry commented 1 year ago

@yuxuan-z19 looks great, I'll merge this. Thanks for your contributions!