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

Adds a new literal type to store IntEnum as Literal types. #1227

Merged
merged 7 commits into from
Dec 9, 2023

Conversation

diptorupd
Copy link
Contributor

@diptorupd diptorupd commented Nov 22, 2023

  • Have you provided a meaningful PR description?

    • Adds a new IntEnumLiteral type with corresponding data model into the DpexExpKernelTargetContext.
      The type is used to pass in or define an IntEnum flag as an numba.types.IntegerLiteral inside a kernel function.
  • Have you added a test, reproducer or referred to an issue with a reproducer?

  • Have you tested your changes locally for CPU and GPU devices?

  • Have you made sure that new changes do not introduce compiler warnings?

  • If this PR is a work in progress, are you filing the PR as a draft?

@diptorupd diptorupd force-pushed the experimental/inteumliteral branch 3 times, most recently from 287b17f to 72177b8 Compare November 25, 2023 17:48
@diptorupd diptorupd requested a review from ZzEeKkAa November 25, 2023 17:49
@diptorupd diptorupd force-pushed the experimental/inteumliteral branch from 72177b8 to ddcea7b Compare November 25, 2023 17:52
@diptorupd
Copy link
Contributor Author

@ZzEeKkAa the PR is good to go as-is. There is an additional unit test case I want to add that will verify that an intEnumLiteral type is parsed as an constant literal and lowered as such in the LLVM IR. I will add that test case after I have fixed the overload inlining in a separate PR.

@diptorupd diptorupd force-pushed the experimental/inteumliteral branch 2 times, most recently from 57a66d5 to 6e5ccd7 Compare November 25, 2023 19:28
@ZzEeKkAa
Copy link
Contributor

@ZzEeKkAa the PR is good to go as-is. There is an additional unit test case I want to add that will verify that an intEnumLiteral type is parsed as an constant literal and lowered as such in the LLVM IR. I will add that test case after I have fixed the overload inlining in a separate PR.

May be we can add this test case here and mark it as xfail? Don't want you to overload inline fix with unrelated code.

@diptorupd diptorupd force-pushed the experimental/inteumliteral branch 2 times, most recently from 9ffb10e to 6bfb015 Compare December 7, 2023 04:42
@diptorupd diptorupd changed the base branch from main to experimental/enable_overloads December 7, 2023 04:43
Base automatically changed from experimental/enable_overloads to main December 7, 2023 06:05
@diptorupd diptorupd force-pushed the experimental/inteumliteral branch from 6bfb015 to 9a941af Compare December 7, 2023 06:06
Diptorup Deb added 5 commits December 7, 2023 18:01
    - Adds a new IntEnumLiteral type with corresponding
      data model into the DpexExpKernelTargetContext.
      The type is used to pass in or define an IntEnum flag as
      an Integer literal inside a kernel function.
@diptorupd diptorupd force-pushed the experimental/inteumliteral branch from bd28ec1 to 7d894a5 Compare December 8, 2023 00:01
    - To get the experimental device_func decorator to be usable
      standalone the decorator is now available via the
      numba_dpex.experimental module.
    - The DpexExpKernelTarget allows dynamic_globals to make it
      possible to call device_func from kernel.
@diptorupd diptorupd force-pushed the experimental/inteumliteral branch from c823e04 to ec3e962 Compare December 8, 2023 23:52
@diptorupd
Copy link
Contributor Author

diptorupd commented Dec 8, 2023

May be we can add this test case here and mark it as xfail? Don't want you to overload inline fix with unrelated code.

The test case I wanted to add was to make sure that FlagEnum objects are lowered as scalar values in the generated LLVM IR. I have added the test in b1ac8d6. The PR is good to go and I will merge after CI is happy.

@diptorupd diptorupd force-pushed the experimental/inteumliteral branch 2 times, most recently from e85a04f to ec3e962 Compare December 9, 2023 01:58
@diptorupd diptorupd force-pushed the experimental/inteumliteral branch from ec3e962 to b1ac8d6 Compare December 9, 2023 15:03
@diptorupd diptorupd merged commit a92e9b3 into main Dec 9, 2023
36 of 43 checks passed
@diptorupd diptorupd deleted the experimental/inteumliteral branch December 9, 2023 15:50
github-actions bot added a commit that referenced this pull request Dec 9, 2023
Adds a new literal type to store IntEnum as Literal types. a92e9b3
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.

2 participants