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

CUDA Version of the Formal Integral #1837

Merged
merged 41 commits into from
Feb 17, 2022

Conversation

KevinCawley
Copy link
Contributor

@KevinCawley KevinCawley commented Dec 2, 2021

This creates the implementation of the formal_integral on a GPU using Numba's Cuda.

Description

There is now a file that runs the formal_integral on the GPU. If a NVIDIA GPU is detected, then the formal_integral will run using the GPU code. However, if there is no NVIDIA GPU then it will run using the numba implementation.

This involves a new test file that tests against the numba implementation to ensure that there is no difference.

Motivation and context

This is a new feature that will greatly speed up the computation of the numba integral by allowing it to run in parallel on the GPU.

How has this been tested?

  • Testing pipeline.
  • Other.

Examples

Type of change

  • Bug fix.
  • New feature.
  • Breaking change.
  • None of the above.

Checklist

  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
    • (optional) I have built the documentation on my fork following the instructions.
  • I have assigned and requested two reviewers for this pull request.

@tardis-bot
Copy link
Contributor

Before a pull request is accepted, it must meet the following criteria:

  • Is the necessary information provided?
  • Is this a duplicate PR?
    • If a new PR is clearly a duplicate, ask how this PR is different from the original PR?
    • If this PR is about to be merged, close the original PR with a link to this new PR that solved the issue.
  • Does it pass existing tests and are new tests provided if required?
    • The test coverage should not decrease, and for new features should be close to 100%.
  • Is the code tidy?
    • No unnecessary print lines or code comments.

@KevinCawley KevinCawley marked this pull request as ready for review February 13, 2022 15:21
@KevinCawley KevinCawley requested a review from Rodot- February 15, 2022 16:02
@Rodot-
Copy link
Contributor

Rodot- commented Feb 15, 2022

@epassaro it looks like the code coverage is failing from the tests, is there any way to tell it not the check there?

@Rodot-
Copy link
Contributor

Rodot- commented Feb 15, 2022

Looks like cudatoolkit needs to be installed from conda to run this, so this should either be in the documentation or in the environment file. Not sure how nicely it will play with computers that don't have cuda GPUs when you install it though so I'm not sure if the environment file is the best place to put it

@epassaro
Copy link
Member

@epassaro it looks like the code coverage is failing from the tests, is there any way to tell it not the check there?

@epassaro it looks like the code coverage is failing from the tests, is there any way to tell it not the check there?

It's already configured at https://github.com/tardis-sn/tardis/blob/master/.docstr.yaml

I don't know why it's not working, maybe it's a regression on newer versions. I'll check on the package repo.

@Rodot-
Copy link
Contributor

Rodot- commented Feb 15, 2022

@epassaro it looks like the code coverage is failing from the tests, is there any way to tell it not the check there?

@epassaro it looks like the code coverage is failing from the tests, is there any way to tell it not the check there?

It's already configured at https://github.com/tardis-sn/tardis/blob/master/.docstr.yaml

I don't know why it's not working, maybe it's a regression on newer versions. I'll check on the package repo.

Thanks!

@epassaro
Copy link
Member

Sorry, Didn't realize that parameter is commented out.

At some point, we discussed with @andrewfullard and agreed the tests should have docstrings.

@Rodot-
Copy link
Contributor

Rodot- commented Feb 15, 2022

Sorry, Didn't realize that parameter is commented out.

At some point, we discussed with @andrewfullard and agreed the tests should have docstrings.

Okay, cool, good to know. @KevinCawley looks like you need to document the tests

@Rodot-
Copy link
Contributor

Rodot- commented Feb 15, 2022

On the bright side, all the GPU tests are passing when I run them on a machine with an NVIDIA GPU and they all pass!

@Rodot-
Copy link
Contributor

Rodot- commented Feb 17, 2022

Why isn't the code coverage comparing to the current main?

@Rodot- Rodot- merged commit 69b433c into tardis-sn:master Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants