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

Fix Invalid Suffix on Literal with PRId in C++11 #63

Closed
wants to merge 13 commits into from
Closed

Conversation

smazouz42
Copy link

This pull request addresses issue #62 by adding a space between the % and PRId64/PRId16/PRId8 to fix that.

EmilyBourne and others added 7 commits June 27, 2024 08:10
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 <louise.bourne@gmail.com>
Co-authored-by: bauom <40796259+bauom@users.noreply.github.com>
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 <louise.bourne@gmail.com>
Co-authored-by: bauom <40796259+bauom@users.noreply.github.com>
Co-authored-by: Emily Bourne <emily.bourne@epfl.ch>
@pyccel-bot
Copy link

pyccel-bot bot commented Jun 28, 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 June 28, 2024 16:14
@smazouz42 smazouz42 changed the title fix: add space between '%' and PRId64 to resolve C++11 compilation wa… Fix Invalid Suffix on Literal with PRId64 in C++11 Jun 28, 2024
@smazouz42 smazouz42 marked this pull request as ready for review June 28, 2024 16:16
@pyccel-bot
Copy link

pyccel-bot bot commented Jun 28, 2024

I can't seem to find your checklist to confirm that you have completed all necessary tasks. Please request one using /bot checklist.

@github-actions github-actions bot marked this pull request as draft June 28, 2024 16:16
@smazouz42 smazouz42 marked this pull request as ready for review June 28, 2024 16:17
@pyccel-bot
Copy link

pyccel-bot bot commented Jun 28, 2024

I can't seem to find your checklist to confirm that you have completed all necessary tasks. Please request one using /bot checklist.

@smazouz42
Copy link
Author

smazouz42 commented Jun 28, 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

@github-actions github-actions bot marked this pull request as draft June 28, 2024 16:17
@smazouz42
Copy link
Author

/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.

@smazouz42 smazouz42 changed the title Fix Invalid Suffix on Literal with PRId64 in C++11 Fix Invalid Suffix on Literal with PRId in C++11 Jun 28, 2024
@smazouz42 smazouz42 marked this pull request as ready for review June 28, 2024 17:14
@pyccel-bot
Copy link

pyccel-bot bot commented Jun 28, 2024

It seems like you have forgotten to complete your checklist for this pull request. Please check the list here, fix the missing items and let me know when everything is ticked and fixed with /bot mark as ready.

@github-actions github-actions bot marked this pull request as draft June 28, 2024 17:14
@smazouz42 smazouz42 marked this pull request as ready for review June 28, 2024 17:16
@pyccel-bot
Copy link

pyccel-bot bot commented Jun 28, 2024

It seems like you have forgotten to complete your checklist for this pull request. Please check the list here, fix the missing items and let me know when everything is ticked and fixed with /bot mark as ready.

@github-actions github-actions bot marked this pull request as draft June 28, 2024 17:17
@smazouz42 smazouz42 marked this pull request as ready for review June 28, 2024 17:17
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.

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.

@github-actions github-actions bot marked this pull request as draft June 28, 2024 17:18
@pyccel-bot
Copy link

pyccel-bot bot commented Jun 28, 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.

@smazouz42 smazouz42 marked this pull request as ready for review July 2, 2024 14:44
@pyccel-bot
Copy link

pyccel-bot bot commented Jul 2, 2024

There are unrecognised tests.
The following is a list of keywords which can be used to run tests. Tests in bold are run by pull requests when they are marked as ready for review:

  • linux : Runs the unit tests on a Linux system.
  • windows : Runs the unit tests on a Windows system.
  • macosx : Runs the unit tests on a MacOS X system.
  • cuda : Runs the cuda unit tests on a Linux system.
  • coverage : Runs the unit tests on a Linux system and checks the coverage of the tests.
  • docs : Checks if the documentation follows the numpydoc format.
  • pylint : Runs pylint on files which are too big to be handled by codacy.
  • pyccel_lint : Runs a linter to check that Pyccel's best practices are followed.
  • spelling : Checks if everything in the documentation is spelled (and capitalised) correctly.
  • pr_tests : Runs all the tests marked in bold.
  • pickle : Checks that .pyccel files have been correctly generated and installed by the installation process.
  • editable_pickle : Checks that .pyccel files have been correctly generated and installed by the editable installation process.
  • pickle_wheel : Checks that .pyccel files have been correctly generated and packaged into the wheel.
  • anaconda_linux : Runs the unit tests on a linux system using anaconda for python.
  • anaconda_windows : Runs the unit tests on a windows system using anaconda for python.
  • intel : Runs the unit tests on a linux system using the intel compiler.

These tests can be run with the command /bot run X (multiple tests can be specified separated by spaces), or with try V X to test on Python version V.

@smazouz42
Copy link
Author

/bot run linux

smazouz42 and others added 2 commits July 3, 2024 19:37
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 <louise.bourne@gmail.com>
Co-authored-by: bauom <40796259+bauom@users.noreply.github.com>
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 <louise.bourne@gmail.com>
@EmilyBourne
Copy link
Member

/bot run pr_tests

@github-actions github-actions bot marked this pull request as draft July 9, 2024 11:05
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 marked this pull request as ready for review July 9, 2024 11:36
@EmilyBourne
Copy link
Member

/bot run pr_tests

@EmilyBourne
Copy link
Member

/bot mark as ready

Comment on lines +291 to +293
(PrimitiveIntegerType(),8) : LiteralString("%") + CMacro(' PRId64'),
(PrimitiveIntegerType(),2) : LiteralString("%") + CMacro(' PRId16'),
(PrimitiveIntegerType(),1) : LiteralString("%") + CMacro(' PRId8'),
Copy link
Member

Choose a reason for hiding this comment

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

This seems backwards to me. I would expect

Suggested change
(PrimitiveIntegerType(),8) : LiteralString("%") + CMacro(' PRId64'),
(PrimitiveIntegerType(),2) : LiteralString("%") + CMacro(' PRId16'),
(PrimitiveIntegerType(),1) : LiteralString("%") + CMacro(' PRId8'),
(PrimitiveIntegerType(),8) : LiteralString("% ") + CMacro('PRId64'),
(PrimitiveIntegerType(),2) : LiteralString("% ") + CMacro('PRId16'),
(PrimitiveIntegerType(),1) : LiteralString("% ") + CMacro('PRId8'),

as isn't part of the macro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants