- Notifications
You must be signed in to change notification settings - Fork 173
Implemented Lshift#2556
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
base:main
Are you sure you want to change the base?
Implemented Lshift #2556
Uh oh!
There was an error while loading. Please reload this page.
Conversation
Kishan-Ved commented Feb 27, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
integration_tests/CMakeLists.txt Outdated
| # Intrinsic Functions | ||
| RUN(NAME intrinsics_01 LABELS cpython llvm NOFAST) # any | ||
| RUN(NAME intrinsics_02 LABELS cpython llvm c) # floordiv | ||
| RUN(NAME intrinsics_03 LABELS llvm) # lshift |
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.
| RUN(NAME intrinsics_03 LABELS llvm) # lshift | |
| RUN(NAME intrinsics_03 LABELS cpython llvm) # lshift |
This verifies that the test works with python as well.
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.
Please check the comment below: #2556 (comment)
Thirumalai-Shaktivel left a comment
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.
Looks good, I have left some comments.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Thirumalai-Shaktivel commented Mar 7, 2024
Please mark this PR ready for review once it is ready. |
Kishan-Ved commented Mar 7, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
The test fails for cpython, may I please know the reason. The error is: The file runs when I do Do I need to make more additions to some files? |
Thirumalai-Shaktivel commented Mar 9, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
It fails because, python doesn't have builtin lshift support. I think it needs to be imported from the operator module, see: https://docs.python.org/3/library/operator.html#operator.lshift. Something like: fromoperatorimportlshiftprint(lshift(x, y))Does |
Kishan-Ved commented Mar 9, 2024
Yes, |
Kishan-Ved commented Mar 9, 2024 • edited
Loading Uh oh!
There was an error while loading. Please reload this page.
edited
Uh oh!
There was an error while loading. Please reload this page.
I want lshift to be imported only for the python test. For LPython's implementation, I want the control to be redirected to my intrinsic function. How can I achieve this? |
I thought this would be a good one to get started with LPython implementations.
Reference: https://docs.python.org/3/library/operator.html#operator.lshift