Skip to content
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

Build example 3 if CUDA enabled #222

Merged
merged 15 commits into from
Jan 29, 2025
Merged

Build example 3 if CUDA enabled #222

merged 15 commits into from
Jan 29, 2025

Conversation

jwallwork23
Copy link
Contributor

@jwallwork23 jwallwork23 commented Jan 7, 2025

Closes #208.
Closes #227.

This PR does several things:

  • Build example 3 if both CUDA and MPI are enabled.
  • Run example 3 in run_test_suite.sh if it has been built.
  • Address the example 3 Python issue raised in Device error in example 3 - GPU #227.
  • Fix missing imports in pt2ts.py script in example 3.
  • Rename the scripts in the MultiGPU example to start with multigpu, for consistency with the other examples.
  • Fix the numbering of the ctest commands in the examples CMakeLists (they were all ones).

I've attached the build script that I used to get this working locally:
build.sh.txt

@jwallwork23 jwallwork23 added the testing Related to FTorch testing label Jan 7, 2025
@jwallwork23 jwallwork23 self-assigned this Jan 7, 2025
@jwallwork23 jwallwork23 force-pushed the 208_multi-gpu-build branch 2 times, most recently from 6cc94c8 to 9d4aa86 Compare January 13, 2025 09:53
@jwallwork23 jwallwork23 marked this pull request as ready for review January 13, 2025 15:52
Copy link
Member

@jatkinson1000 jatkinson1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwallwork23

Yes, agree with this.
However, a comment that I have seen before elsewhere - it would be good to avoid "double negatives" - the guard for running integration tests is based on the unit test flag. This requires some mental gymnastics (unless it's just me) and would be a problem if we wanted to add a third set of subtests for some reason in future.

I wonder if moving to having RUN_UNIT and RUN_INTEGRATION variables that default to true and are checked against for running the tests, and setting them to false where necessary in setup would be preferable?

@jwallwork23
Copy link
Contributor Author

jwallwork23 commented Jan 27, 2025

Yes, agree with this. However, a comment that I have seen before elsewhere - it would be good to avoid "double negatives" - the guard for running integration tests is based on the unit test flag. This requires some mental gymnastics (unless it's just me) and would be a problem if we wanted to add a third set of subtests for some reason in future.

I wonder if moving to having RUN_UNIT and RUN_INTEGRATION variables that default to true and are checked against for running the tests, and setting them to false where necessary in setup would be preferable?

Opened #259.

@jwallwork23
Copy link
Contributor Author

Ah, just saw your commit 5935bb6. Apologies, looks like I updated the README on the wrong branch (see #258).

@jatkinson1000
Copy link
Member

@jwallwork23 rebased so this can go into maion with #258 being re-targeted.

Happy to approve once you have a quick glance over to check you are happy with the rebase.
I did check it in #262 as you saw.

@jwallwork23
Copy link
Contributor Author

@jwallwork23 rebased so this can go into maion with #258 being re-targeted.

Happy to approve once you have a quick glance over to check you are happy with the rebase. I did check it in #262 as you saw.

LGTM, thanks @jatkinson1000

Copy link
Member

@jatkinson1000 jatkinson1000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, tested, amended, and rebased.
Approving now @jwallwork23 and happy for you to merge in.

@jwallwork23 jwallwork23 changed the title Build example 3 if CUDA and MPI enabled Build example 3 if CUDA enabled Jan 29, 2025
@jwallwork23 jwallwork23 merged commit c21040d into main Jan 29, 2025
6 checks passed
@jwallwork23 jwallwork23 deleted the 208_multi-gpu-build branch January 29, 2025 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Related to FTorch testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Device error in example 3 - GPU Add 3_MultiGPU example to build process
2 participants