-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Initialize cpp test with gtest
and github action
#13
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a little search on how other open source project organize repos with c++ code. I think we should change the directory a little bit to
cmake
pyg_lib
csrc
// different packages.
// for each package, we can put *.h, *.cc together.
pyg
library.h
library.cc
test
I think it is similar to how pytorch organize their code. WDYT?
@yaoyaowd I tried to follow https://github.com/pytorch/vision/tree/main/torchvision/csrc structure. |
Yes, I think what you originally planned make sense to me. This PR changed the organization a little bit. We can move cmake and test to top level directory. And we can put cc file and h file together in the csr directory or different packages in csr directory. |
I will try to follow the torch style |
CMakeLists.txt
Outdated
@@ -5,6 +5,8 @@ set(PYG_VERSION 0.0.0) | |||
|
|||
option(WITH_CUDA "Enable CUDA support" OFF) | |||
option(USE_PYTHON "Link to Python when building" ON) | |||
option(BUILD_TEST "Enable testing" ON) | |||
option(TEST_WITH_CUDA "CUDA testing" OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this here? IMO, WITH_CUDA
is already sufficient.
CMakeLists.txt
Outdated
@@ -31,3 +35,11 @@ endif() | |||
set_target_properties(${PROJECT_NAME} PROPERTIES | |||
EXPORT_NAME PyG | |||
INSTALL_RPATH ${TORCH_INSTALL_PREFIX}/lib) | |||
|
|||
IF(TEST_WITH_CUDA) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is safe to drop. Let me know if you disagree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also add some quick documentation on how to build and test in CONTRIBUTING.md
? Just a few code lines are sufficient.
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
Co-authored-by: Matthias Fey <matthias.fey@tu-dortmund.de>
It looks like we need to move the test file now (no tests found reported :)) |
gtest
and github action
No description provided.