Skip to content

Conversation

smazouz42
Copy link

This pull request addresses issue #68 by changing the implantation of kernel decorate, so the function runs multiple times depending on the number of blocks and the number of threads for each block

EmilyBourne and others added 9 commits July 19, 2024 15:30
This PR aims to make the C code compilable using nvcc. The cuda language was added as well as a CudaCodePrinter.

Changes to stdlib:

Wrapped expressions using complex types in an `ifndef __NVCC__` to avoid processing them with the nvcc compiler

---------

Co-authored-by: Mouad Elalj, EmilyBourne
This pull request fixes #48, by implementing a tiny wrapper for CUDA and a wrapper for non-CUDA functionalities only with external 'C'.

**Commit Summary**

-    Implemented new header printer for CUDA.
-    Added CUDA wrapper assignment
-    Instead of wrapping all local headers, wrap only C functions with extern 'C'

---------

Co-authored-by: EmilyBourne <[email protected]>
Co-authored-by: bauom <[email protected]>
This pull request addresses issue #28 by implementing a new feature in
Pyccel that allows users to define custom GPU kernels. The syntax for
creating these kernels is inspired by Numba. and I also need to fix
issue #45 for testing purposes

**Commit Summary**

- Introduced KernelCall class
- Added cuda printer methods _print_KernelCall and _print_FunctionDef to
generate the corresponding CUDA representation for both kernel calls and
definitions
- Added IndexedFunctionCall  represents an indexed function call
- Added CUDA module and cuda.synchronize()
- Fixing a bug that I found in the header: it does not import the
necessary header for the used function

---------

Co-authored-by: EmilyBourne <[email protected]>
Co-authored-by: bauom <[email protected]>
Co-authored-by: Emily Bourne <[email protected]>
This pull request addresses issue #59 by adding more CUDA-specific
keywords to enhance the checking of variable/function names and prevent
name clashes

---------

Co-authored-by: EmilyBourne <[email protected]>
Co-authored-by: bauom <[email protected]>
This pull request addresses issue
#41 by implementing a new
feature in Pyccel that allows users to define a custom device

**Commit Summary**

- Adding handler for custom device and its code generation.
- Adding test

---------

Co-authored-by: EmilyBourne <[email protected]>
@pyccel-bot
Copy link

pyccel-bot bot commented Jul 23, 2024

Hello again! Thank you for this new pull request 🤩.

Please begin by requesting your checklist using the command /bot checklist

@github-actions github-actions bot marked this pull request as draft July 23, 2024 15:01
@smazouz42
Copy link
Author

/bot run cuda

@smazouz42 smazouz42 linked an issue Jul 23, 2024 that may be closed by this pull request
@smazouz42
Copy link
Author

smazouz42 commented Jul 23, 2024

Here is your checklist. Please tick items off when you have completed them or determined that they are not necessary for this pull request:

  • Write a clear PR description
  • Add tests to check your code works as expected
  • Update documentation if necessary
  • Update Changelog
  • Ensure any relevant issues are linked
  • Ensure new tests are passing

@smazouz42 smazouz42 marked this pull request as ready for review July 23, 2024 15:40
@github-actions github-actions bot marked this pull request as draft July 23, 2024 15:42
@pyccel-bot
Copy link

pyccel-bot bot commented Jul 23, 2024

Unfortunately your PR is not passing the tests so it is not quite ready for review yet. Let me know when it is fixed with /bot mark as ready.

Copy link

@pyccel-bot pyccel-bot bot left a comment

Choose a reason for hiding this comment

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

There seems to be lines in this PR which aren't tested. Please take a look at my comments and add tests which cover the new code.

If this is modified code which cannot be easily tested in this PR please open an issue to request that this code be either removed or tested. Once you have done that please leave a message on the relevant conversation beginning with the line /bot accept and referencing the issue.

Similarly if the new code cannot be tested for some reason, please leave a comment beginning with the line /bot accept on the relevant conversation explaining why the code can't be tested.

@smazouz42
Copy link
Author

/bot run docs

@smazouz42
Copy link
Author

/bot run docs

@smazouz42 smazouz42 marked this pull request as ready for review July 23, 2024 17:34
Copy link

@pyccel-bot pyccel-bot bot left a comment

Choose a reason for hiding this comment

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

Good job ! Your PR is using all the code it added/changed.

@pyccel-bot
Copy link

pyccel-bot bot commented Jul 23, 2024

Hey @pyccel/pyccel-dev ! @smazouz42 has just created this great new pull request! Check it out and let me know what you think!

@pyccel-bot pyccel-bot bot requested a review from a team July 23, 2024 17:56
@pyccel-bot
Copy link

pyccel-bot bot commented Jul 26, 2024

Unfortunately your PR is not passing the tests so it is not quite ready for review yet. Let me know when it is fixed with /bot mark as ready.

@github-actions github-actions bot marked this pull request as draft July 26, 2024 13:31
Copy link

@pyccel-bot pyccel-bot bot left a comment

Choose a reason for hiding this comment

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

Good job ! Your PR is using all the code it added/changed.

@smazouz42 smazouz42 marked this pull request as ready for review July 26, 2024 13:55
Copy link

@pyccel-bot pyccel-bot bot left a comment

Choose a reason for hiding this comment

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

Good job ! Your PR is using all the code it added/changed.

@pyccel-bot pyccel-bot bot added the Ready_for_review Received at least one approval. Requires review from senior developer label Jul 26, 2024
@pyccel-bot
Copy link

pyccel-bot bot commented Jul 26, 2024

@EmilyBourne, @smazouz42 has been working hard and thinks that they have now replied to or fixed all your comments. Could you take another look at the PR and see if you can approve now?

@pyccel-bot pyccel-bot bot requested a review from EmilyBourne July 26, 2024 14:15
Copy link
Member

@EmilyBourne EmilyBourne left a comment

Choose a reason for hiding this comment

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

Looks good to me. This should make it much easier to test our array devs!

@pyccel-bot pyccel-bot bot added Ready_to_merge Approved by senior developer. Ready for final approval and merge and removed Ready_for_review Received at least one approval. Requires review from senior developer labels Jul 26, 2024
@EmilyBourne EmilyBourne enabled auto-merge (squash) July 26, 2024 14:38
@EmilyBourne
Copy link
Member

/bot run pr_tests

Copy link

@pyccel-bot pyccel-bot bot left a comment

Choose a reason for hiding this comment

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

Good job ! Your PR is using all the code it added/changed.

@EmilyBourne EmilyBourne merged commit bf76594 into devel Jul 26, 2024
@EmilyBourne EmilyBourne deleted the issue_68 branch July 26, 2024 16:42
@pyccel-bot pyccel-bot bot added Ready_to_merge Approved by senior developer. Ready for final approval and merge and removed Ready_to_merge Approved by senior developer. Ready for final approval and merge labels Jul 26, 2024
EmilyBourne added a commit that referenced this pull request Aug 29, 2024
This pull request addresses issue #68 by changing the implantation of
kernel decorate, so the function runs multiple times depending on the
number of blocks and the number of threads for each block

---------

Co-authored-by: EmilyBourne <[email protected]>
Co-authored-by: bauom <[email protected]>
EmilyBourne added a commit that referenced this pull request Sep 3, 2024
This pull request addresses issue #68 by changing the implantation of
kernel decorate, so the function runs multiple times depending on the
number of blocks and the number of threads for each block

---------

Co-authored-by: EmilyBourne <[email protected]>
Co-authored-by: bauom <[email protected]>
EmilyBourne added a commit that referenced this pull request Sep 25, 2024
This pull request addresses issue #68 by changing the implantation of
kernel decorate, so the function runs multiple times depending on the
number of blocks and the number of threads for each block

---------

Co-authored-by: EmilyBourne <[email protected]>
Co-authored-by: bauom <[email protected]>
EmilyBourne added a commit that referenced this pull request Nov 8, 2024
This pull request addresses issue #68 by changing the implantation of
kernel decorate, so the function runs multiple times depending on the
number of blocks and the number of threads for each block

---------

Co-authored-by: EmilyBourne <[email protected]>
Co-authored-by: bauom <[email protected]>
EmilyBourne added a commit that referenced this pull request Jan 8, 2025
This pull request addresses issue #68 by changing the implantation of
kernel decorate, so the function runs multiple times depending on the
number of blocks and the number of threads for each block

---------

Co-authored-by: EmilyBourne <[email protected]>
Co-authored-by: bauom <[email protected]>
EmilyBourne added a commit that referenced this pull request Jan 10, 2025
This pull request addresses issue #68 by changing the implantation of
kernel decorate, so the function runs multiple times depending on the
number of blocks and the number of threads for each block

---------

Co-authored-by: EmilyBourne <[email protected]>
Co-authored-by: bauom <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ready_to_merge Approved by senior developer. Ready for final approval and merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve kernel decorator

4 participants