-
Notifications
You must be signed in to change notification settings - Fork 15
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
Unit tests (using pFunit) #76
base: main
Are you sure you want to change the base?
Conversation
tests/test_ftorch.pf gives a start of a unit test for |
Has this gone anywhere, or has it stagnated? As far as I see it tests are the only thing preventing us from making a JOSS submission, and with at least 3 research projects using FTorch that are likely to publish soon this is now a matter of urgency. For something minimal I was thinking we could have some CMake Test to build and run the SimpleNet example for a few different inputs and check the outputs are correct as an integration test. |
There's a start here, but it got a bit stalled as I could use some help with the cmake. Perhaps someone is able to work with me on this? @TomMelt ? Currently has an attempt at using CMake test and does a simple probe of the tensor conversion functions. I agree about running SimpleNet for some integration tests. |
Hi @dorchard I'm more than happy to help with the |
26219c2
to
cf1be0f
Compare
.github/workflows/test_suite.yml
Outdated
git clone https://github.com/Goddard-Fortran-Ecosystem/pFUnit.git | ||
mkdir pFUnit/build | ||
cd pFUnit/build | ||
cmake .. |
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.
Try -DCMAKE_INSTALL_PREFIX=...
to override the build path to avoid version number.
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 tried this but it didn't seem to help. Pinning the pFUnit version for now (see fdc4d05).
ca920df
to
c84fee1
Compare
c84fee1
to
24ecea6
Compare
Perhaps this PR could just set up the infrastructure and add tests for the tensor constructors and we could address writing unit tests for the rest of FTorch in a follow-up PR? |
I have started putting in the infrastructure for us to write some unit tests using pFunit.
Create simple unit tests for main functions
torch_tensor_from_blob
(WIP)torch_tensor_from_array
torch_tensor_zeros
torch_tensor_ones
torch_tensor_empty
Other things using
torch_module_forward
could be better with an integration test since it will need a lot of setup code anyway.Closing this would fix #4