Page MenuHomePhabricator

agozillon (Andrew Gozillon)
User

Projects

User does not belong to any projects.

User Details

User Since
May 29 2017, 9:39 PM (303 w, 6 d)

Recent Activity

Fri, Mar 24

agozillon updated the diff for D146850: [OpenMP][Flang][MLIR] Implement OffloadModuleInterface for OpenMP Dialect and convert is_device to an Attribute.
  • [MLIR][OpenMP] Newline at end of OpenMPInterfaces.h file
Fri, Mar 24, 4:10 PM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D146850: [OpenMP][Flang][MLIR] Implement OffloadModuleInterface for OpenMP Dialect and convert is_device to an Attribute.

A patch based on https://reviews.llvm.org/D146721 by @kiranchandramohan an attempt at adding a module interface for OpenMP offload related attributes and functions that apply to modules. Using the existing omp.is_device work as the initial attribute (although this has been tested with the RTLModuleFlag's patch i have up and it works fine as well).

Fri, Mar 24, 4:05 PM · Restricted Project, Restricted Project, Restricted Project
agozillon added reviewers for D146850: [OpenMP][Flang][MLIR] Implement OffloadModuleInterface for OpenMP Dialect and convert is_device to an Attribute: kiranchandramohan, jsjodin, TIFitis, dpalermo, skatrak, domada.
Fri, Mar 24, 3:53 PM · Restricted Project, Restricted Project, Restricted Project
agozillon requested review of D146850: [OpenMP][Flang][MLIR] Implement OffloadModuleInterface for OpenMP Dialect and convert is_device to an Attribute.
Fri, Mar 24, 3:41 PM · Restricted Project, Restricted Project, Restricted Project

Thu, Mar 23

agozillon added a comment to D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.

Sorry to ping

Pinging every week is not too much but considered OK.

FWIW, I think the patch is reasonable. I would remove the "rtl" part, and probably just call it "omp.flags" but otherwise it makes sense.
That said, @kiranchandramohan should give his opinion.

Thank you @jdoerfert I'll keep that in mind for the future!

Thank you, I'll wait on @kiranchandramohan's opinion before I update the name then, so as to get the next series of review comments done in a single update.

Sorry for the delay here. I would like to just have a quick check whether having an interface is possible. If not, we can continue with this. I will come back to this tomorrow.

I did not get much time to spend on this. But I have a patch ( https://reviews.llvm.org/D146721) with a trivial Device Interface. We can extend it later on and add attribute interfaces if required. It has two functions from one of @domada 's patch. As it is, the only benefits the interface gives are i) Put all the device related functions into a single place ii) Hide how the values are get and set (uses the module attributes that you have decided to use) iii) Makes it easy to change if there is a different mechanism iv) Also allows for an alternative implementation for other modules where these values are available differently. Please let me know how this looks. Also, given that this is straightforward I would also like to check whether I am missing anything.

Thu, Mar 23, 7:43 AM · Restricted Project, Restricted Project

Wed, Mar 22

agozillon added a comment to D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.

Sorry to ping

Pinging every week is not too much but considered OK.

FWIW, I think the patch is reasonable. I would remove the "rtl" part, and probably just call it "omp.flags" but otherwise it makes sense.
That said, @kiranchandramohan should give his opinion.

Wed, Mar 22, 5:11 AM · Restricted Project, Restricted Project

Tue, Mar 21

agozillon added a comment to D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.

Sorry to ping this for you busy reviewers, however, I was hoping that this could get reviewed again as the pre-requisite patches required for the lowering of this attribute now exist! Namely the fopenmp-is-device patch and the ability to lower module attributes https://reviews.llvm.org/D145932

Tue, Mar 21, 5:26 PM · Restricted Project, Restricted Project

Mon, Mar 20

agozillon added a comment to D146063: [Flang][OpenMP][MLIR] Add lowering from parse tree to MLIR support for Declare Target for functions and subroutines.

I believe I understand your concerns.

Mon, Mar 20, 11:40 AM · Restricted Project, Restricted Project, Restricted Project
agozillon abandoned D144883: [MLIR] Add convertModule functionallity to the LLVMTranslationInterface and ModuleTranslation.

Going to abandon and close this revision as the Reviewers point was implemented and accepted in the following patch https://reviews.llvm.org/D145932/ by @skatrak, thank you very much @skatrak for looking into this! And thank you @ftynse for recommending a better direction.

Mon, Mar 20, 10:07 AM · Restricted Project, Restricted Project

Fri, Mar 17

agozillon committed rG0cd31a7d3087: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to… (authored by agozillon).
[Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to…
Fri, Mar 17, 9:13 AM · Restricted Project, Restricted Project, Restricted Project
agozillon closed D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
Fri, Mar 17, 9:13 AM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.

May I please request a final acceptance from both @jhuber6 and @awarzynski before I commit this upstream! If you have no further comments to add or requests of course.

Fri, Mar 17, 8:28 AM · Restricted Project, Restricted Project, Restricted Project

Thu, Mar 16

agozillon added a comment to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.

Recent commit added some more detail to the comment on the fembed-offload-object argument as requested by @awarzynski

Thu, Mar 16, 5:14 PM · Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
  • [Flang][Driver] Expand further on the embed-offload-object comment
Thu, Mar 16, 5:12 PM · Restricted Project, Restricted Project, Restricted Project
agozillon updated the summary of D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
Thu, Mar 16, 5:05 PM · Restricted Project, Restricted Project, Restricted Project
agozillon added inline comments to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
Thu, Mar 16, 5:01 PM · Restricted Project, Restricted Project, Restricted Project
agozillon added inline comments to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
Thu, Mar 16, 11:37 AM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.

Deleted the clang test that was forwarding to Flang and merged with the omp-frontend-forwarding.f90 test where relevant. Second push was because I forgot to add a missing newline, which I seem to do frequently...

Thu, Mar 16, 9:36 AM · Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
  • Readd missing newline
Thu, Mar 16, 9:34 AM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.

Flang will also support OpenACC for offload. It is very similar to OpenMP.

Thu, Mar 16, 9:33 AM · Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
  • [Flang][Driver] Try to fix failing omp-frontend-forwarding.f90 test
  • [Flang][Driver] Simplify omp-frontend-forwarding.f90 test
  • [Flang][Driver][Test] Delete flang-omp test from Clang and merge tests into omp-frontend-forwarding.f90
Thu, Mar 16, 9:28 AM · Restricted Project, Restricted Project, Restricted Project
agozillon added inline comments to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
Thu, Mar 16, 9:25 AM · Restricted Project, Restricted Project, Restricted Project
agozillon added inline comments to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
Thu, Mar 16, 6:14 AM · Restricted Project, Restricted Project, Restricted Project

Tue, Mar 14

agozillon added reviewers for D146063: [Flang][OpenMP][MLIR] Add lowering from parse tree to MLIR support for Declare Target for functions and subroutines: dpalermo, kiranchandramohan, jsjodin, skatrak, TIFitis, kiranktp, NimishMishra.
Tue, Mar 14, 9:34 AM · Restricted Project, Restricted Project, Restricted Project
agozillon requested review of D146063: [Flang][OpenMP][MLIR] Add lowering from parse tree to MLIR support for Declare Target for functions and subroutines.
Tue, Mar 14, 9:30 AM · Restricted Project, Restricted Project, Restricted Project

Mon, Mar 13

agozillon added a comment to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.

Recent update was to simplify the omp-frontend-forwarding.f90 test

Mon, Mar 13, 1:34 PM · Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
  • [Flang][Driver] Simplify omp-frontend-forwarding.f90 test
Mon, Mar 13, 1:29 PM · Restricted Project, Restricted Project, Restricted Project
agozillon added inline comments to D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
Mon, Mar 13, 7:31 AM · Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
  • [Flang][Driver] Try to fix failing omp-frontend-forwarding.f90 test
Mon, Mar 13, 4:31 AM · Restricted Project, Restricted Project, Restricted Project

Fri, Mar 10

agozillon added reviewers for D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain: jsjodin, skatrak, TIFitis, kiranktp, dpalermo, kiranchandramohan, NimishMishra.
Fri, Mar 10, 10:57 AM · Restricted Project, Restricted Project, Restricted Project
agozillon requested review of D145815: [Flang][Driver] Add support for fopenmp-is-device and fembed-offload-object to Flang ToolChain.
Fri, Mar 10, 10:55 AM · Restricted Project, Restricted Project, Restricted Project

Tue, Mar 7

agozillon committed rGe002a38b20e3: [Flang][OpenMP][MLIR][Driver][bbc] Add -fopenmp-is-device flag to Flang -fc1 &… (authored by agozillon).
[Flang][OpenMP][MLIR][Driver][bbc] Add -fopenmp-is-device flag to Flang -fc1 &…
Tue, Mar 7, 10:58 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon closed D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
Tue, Mar 7, 10:58 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.

Cleaned up the test, thank you both for teaching me more about the compiler and test infrastructure! If you're happy with the test changes @kiranchandramohan I'll commit the changes upstream to close out the review?

Tue, Mar 7, 8:49 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
  • [Flang][Driver] Tidy up omp-is-device.f90 test
Tue, Mar 7, 8:47 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.

LG. See one minor comment in the tests.

I would prefer having an Interface for Target Modules if that could be made to work. I guess this can be taken up separately after https://reviews.llvm.org/D144883.

Tue, Mar 7, 7:33 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.

The recent update removed the added offload related code from Flang.h/.cpp and removed the related test.

Tue, Mar 7, 5:50 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
  • [Flang][ToolChain][OpenMP][Driver] Reduce changes to only add -fc1 support
Tue, Mar 7, 5:42 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added inline comments to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
Tue, Mar 7, 4:43 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon updated the summary of D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
Tue, Mar 7, 3:58 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Mon, Mar 6

agozillon added inline comments to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
Mon, Mar 6, 12:12 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added inline comments to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
Mon, Mar 6, 6:03 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Fri, Mar 3

agozillon added a comment to D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.

The other option is for Modules to implement an interface and then the Translation can detect this and forward it to the OpenMP Dialect translation in OpenMPToLLVMIRTranslation.cpp.

Could you point me to the LLVMTranslation patch that will insert this info into the LLVM IR module? Is it https://reviews.llvm.org/D144883?

Fri, Mar 3, 12:47 PM · Restricted Project, Restricted Project
agozillon updated the summary of D145264: [OpenMP][MLIR] Lower and apply RTLModuleFlagsAttr.
Fri, Mar 3, 12:29 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D145264: [OpenMP][MLIR] Lower and apply RTLModuleFlagsAttr.

This builds on the following phabricator patches that are in review at the moment, so there are components that are used here that are added from these:

Fri, Mar 3, 12:24 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a reviewer for D145264: [OpenMP][MLIR] Lower and apply RTLModuleFlagsAttr: kiranchandramohan.
Fri, Mar 3, 12:17 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon requested review of D145264: [OpenMP][MLIR] Lower and apply RTLModuleFlagsAttr.
Fri, Mar 3, 12:13 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added inline comments to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
Fri, Mar 3, 11:57 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.

Thank you very much @awarzynski I will wait for further approval!

Fri, Mar 3, 10:33 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.

The new update adds the suggested new tests! Thank you very much @awarzynski for suggesting them that was a great help. Hopefully the new additions cover what you have requested, if not I am of course happy to change or add more tests as needed.

Fri, Mar 3, 9:03 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
  • [Flang][MLIR][Test] Add newline at end of test file
Fri, Mar 3, 8:19 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
  • [MLIR][OpenMP] Fix attribute helpers to apply to more than builtin.module
  • [Flang][mlir] Adding space at the end of the omp-is-device test file
  • [Clang][Flang][Driver][Test] Add flang-omp.f90 to test fopenmp/fopenmp-is-device for flang driver-mode
  • [Flang][MLIR][OpenMP] Add additional tests to omp-is-device.f90 test
Fri, Mar 3, 8:01 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Thu, Mar 2

agozillon added a comment to D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.

Removed the incorrect and stupidly strong comment made by myself in the last patch update.

Thu, Mar 2, 4:24 AM · Restricted Project, Restricted Project
agozillon updated the diff for D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.
  • [OpenMP][MLIR] Simplify the RTLModuleFlagsAttr with optional parameters
  • [OpenMP][MLIR] Make set/getRTLFlags work on an operation rather than a builtin.module
  • [OpenMP][MLIR] Remove erroneous comment
Thu, Mar 2, 4:22 AM · Restricted Project, Restricted Project
agozillon added a comment to D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.

The other option is for Modules to implement an interface and then the Translation can detect this and forward it to the OpenMP Dialect translation in OpenMPToLLVMIRTranslation.cpp.

Could you point me to the LLVMTranslation patch that will insert this info into the LLVM IR module? Is it https://reviews.llvm.org/D144883?

Thu, Mar 2, 4:03 AM · Restricted Project, Restricted Project

Wed, Mar 1

agozillon added a comment to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.

After asking @jsjodin and @skatrak for some input on additional tests that could be added and having a look around the existing tests we couldn't really come up with any additional tests to add to the ones that are in the patch at the moment (inside of omp-is-device.f90 and driver-help.f90) unfortunately. Primarily as there isn't any use of this attribute yet, although there will be quite soon.

Wed, Mar 1, 1:10 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
  • [Flang][mlir] Adding space at the end of the omp-is-device test file
Wed, Mar 1, 12:57 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D144869: [Flang][Tool][bbc] Emit Module Wrapper in addition to body.

Thank you @jeanPerier for the help and review, that's it landed now, sorry for making the FIR IR reading harder for you for the time being!

Wed, Mar 1, 12:44 PM · Restricted Project, Restricted Project
agozillon committed rG13b808bda93e: [Flang][Tool][bbc] Emit module wrapper in addition to body (authored by agozillon).
[Flang][Tool][bbc] Emit module wrapper in addition to body
Wed, Mar 1, 12:41 PM · Restricted Project, Restricted Project
agozillon closed D144869: [Flang][Tool][bbc] Emit Module Wrapper in addition to body.
Wed, Mar 1, 12:41 PM · Restricted Project, Restricted Project
agozillon added a comment to D144883: [MLIR] Add convertModule functionallity to the LLVMTranslationInterface and ModuleTranslation.

After a little bit of time going over the suggested change of ditching convertModuleOperation and using the existing convertOperation infrastructure, I can see two ways of doing it:

Wed, Mar 1, 6:06 AM · Restricted Project, Restricted Project

Tue, Feb 28

agozillon added a comment to D144883: [MLIR] Add convertModule functionallity to the LLVMTranslationInterface and ModuleTranslation.

This allows existing dialect modules such as gpu.module to continue to not do dialect specific lowering, allowing them to opt in or out based on their dialects needs.

This is why I also mentioned that we need to "teach the default translation to do nothing with it". Can't we add the interface implementation that returns success instead of hardcoding it as default?

Tue, Feb 28, 9:46 AM · Restricted Project, Restricted Project
agozillon added a comment to D144869: [Flang][Tool][bbc] Emit Module Wrapper in addition to body.

adding it as a discussion point in one of the weekly meetings or is an RFC on discourse perhaps better?

We can briefly discuss it at the meeting tomorrow to check no one rely on not having the module printed.

Tue, Feb 28, 8:18 AM · Restricted Project, Restricted Project
agozillon updated the diff for D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
  • [MLIR][OpenMP] Fix attribute helpers to apply to more than builtin.module
Tue, Feb 28, 7:49 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.

Updated to add default parameters to the attribute, allowing optional specifying of values, changed the get/set RTL functions to work a little more generically and added further tests for the slightly improved syntax as it will now only show flags when they're set.

Tue, Feb 28, 6:37 AM · Restricted Project, Restricted Project
agozillon updated the diff for D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.
  • [OpenMP][MLIR] Simplify the RTLModuleFlagsAttr with optional parameters
  • [OpenMP][MLIR] Make set/getRTLFlags work on an operation rather than a builtin.module
Tue, Feb 28, 6:33 AM · Restricted Project, Restricted Project
agozillon added a comment to D144883: [MLIR] Add convertModule functionallity to the LLVMTranslationInterface and ModuleTranslation.

Why does it have to be a separate interface function? Module is just the builtin.module operation, it looks like we can just call convertOperation for it and teach the default translation to do nothing with it.

Tue, Feb 28, 3:49 AM · Restricted Project, Restricted Project
agozillon added a comment to D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.

Could you update the discourse thread (https://discourse.llvm.org/t/rfc-omp-module-and-omp-function-vs-dialect-attributes-to-encode-openmp-properties/67998) with the chosen approach and reasons before proceeding?

Tue, Feb 28, 1:14 AM · Restricted Project, Restricted Project
agozillon added a comment to D144883: [MLIR] Add convertModule functionallity to the LLVMTranslationInterface and ModuleTranslation.

Why does it have to be a separate interface function? Module is just the builtin.module operation, it looks like we can just call convertOperation for it and teach the default translation to do nothing with it.

Tue, Feb 28, 12:49 AM · Restricted Project, Restricted Project
agozillon added a comment to D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.

Tests?

Tue, Feb 28, 12:40 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Mon, Feb 27

agozillon added reviewers for D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect: dpalermo, TIFitis, kiranktp, NimishMishra, raghavendhra, skatrak, jsjodin, kiranchandramohan.
Mon, Feb 27, 10:46 AM · Restricted Project, Restricted Project
agozillon requested review of D144896: [OpenMP][MLIR] Add RTLModuleFlags attribute to OpenMP Dialect.
Mon, Feb 27, 10:43 AM · Restricted Project, Restricted Project
agozillon requested review of D144883: [MLIR] Add convertModule functionallity to the LLVMTranslationInterface and ModuleTranslation.
Mon, Feb 27, 8:32 AM · Restricted Project, Restricted Project
agozillon added a comment to D144869: [Flang][Tool][bbc] Emit Module Wrapper in addition to body.

This will need a discussion with the FIR team.

Mon, Feb 27, 6:23 AM · Restricted Project, Restricted Project
agozillon updated the summary of D144869: [Flang][Tool][bbc] Emit Module Wrapper in addition to body.
Mon, Feb 27, 6:20 AM · Restricted Project, Restricted Project
agozillon requested review of D144869: [Flang][Tool][bbc] Emit Module Wrapper in addition to body.
Mon, Feb 27, 6:15 AM · Restricted Project, Restricted Project
agozillon updated the diff for D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.

Forgot to add an additional test in initial patch!

Mon, Feb 27, 5:24 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added reviewers for D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute: kiranchandramohan, dpalermo, kiranktp, NimishMishra, TIFitis, raghavendhra, skatrak, jsjodin.
Mon, Feb 27, 5:15 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon requested review of D144864: [Flang][Driver][MLIR] Add -fopenmp-is-device to Flang and link to an omp.is_device attribute.
Mon, Feb 27, 5:11 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Feb 17 2023

agozillon added a comment to D142910: [MLIR][OpenMP][FLANG] Adding MLIR OpenMP dialect Operation for OpenMP's Declare Target.

Thank you for the suggestion, I made the simplification of reducing the clause names, sorry for missing your comment for so long. I had to update which email my notifications were being sent to!

Feb 17 2023, 6:53 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D142910: [MLIR][OpenMP][FLANG] Adding MLIR OpenMP dialect Operation for OpenMP's Declare Target.
  • [MLIR][OpenMP] Change clauses to there shorthand
Feb 17 2023, 6:44 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Feb 2 2023

agozillon added a comment to D142910: [MLIR][OpenMP][FLANG] Adding MLIR OpenMP dialect Operation for OpenMP's Declare Target.

From my current work on Declare Target I don't think you necessarily need an omp.function at least so far, you can distinguish what is a device function via other OpenMP operations that are device outlining directives in OpenMP like Declare Target, but the work on Declare Target is very much in the early stages (https://github.com/ROCm-Developer-Tools/llvm-project/pull/185), so we may find some problems along the way. I think the benefits I see of omp.function is perhaps that it may make the code generation process easier, as you can perhaps just directly generate an omp.function from Declare Target clause members that are functions, the global data could be packaged in the declare.target operation, so we effectively skip the middle man. It also makes sure that the device/target lowering that may be necessary is easily separable from the regular FuncOp lowering.

If we require omp.function (may be we should call it omp.target_function) then we would require something like an omp.target_variable as well isn't it?

That is likely true, and maybe a more general approach than having omp.target_declare if there are other ways to create outlineable global variables (which I imagine there is) and just generally a little more flexible for outlined variables. For now I am waiting to see the results of the poll / discussion to see which way everyone leans on this topic!

Compared to having an attribute like omp.function() { device_type = any }, in the case of "any" and having omp.target_function and omp.function, would there be one of each, or would only one be generated depending on the current target?

Feb 2 2023, 6:24 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D142910: [MLIR][OpenMP][FLANG] Adding MLIR OpenMP dialect Operation for OpenMP's Declare Target.

From my current work on Declare Target I don't think you necessarily need an omp.function at least so far, you can distinguish what is a device function via other OpenMP operations that are device outlining directives in OpenMP like Declare Target, but the work on Declare Target is very much in the early stages (https://github.com/ROCm-Developer-Tools/llvm-project/pull/185), so we may find some problems along the way. I think the benefits I see of omp.function is perhaps that it may make the code generation process easier, as you can perhaps just directly generate an omp.function from Declare Target clause members that are functions, the global data could be packaged in the declare.target operation, so we effectively skip the middle man. It also makes sure that the device/target lowering that may be necessary is easily separable from the regular FuncOp lowering.

If we require omp.function (may be we should call it omp.target_function) then we would require something like an omp.target_variable as well isn't it?

Feb 2 2023, 3:23 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon committed rGf86209fc80d8: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol… (authored by agozillon).
[FLANG][MLIR] Update all module symbol references after changing FuncOp symbol…
Feb 2 2023, 3:00 AM · Restricted Project, Restricted Project
agozillon closed D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.
Feb 2 2023, 3:00 AM · Restricted Project, Restricted Project, Restricted Project

Feb 1 2023

agozillon added a comment to D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.

LGTM. Thanks

Feb 1 2023, 2:24 PM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.

Sorry, done, I've added the fully qualified names.

Feb 1 2023, 6:34 AM · Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.
  • [FLANG][MLIR] remove MangleNameOnCallOp
Feb 1 2023, 6:27 AM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D142910: [MLIR][OpenMP][FLANG] Adding MLIR OpenMP dialect Operation for OpenMP's Declare Target.

As from my current understanding Declare Target also indicates that global data is to be offloaded not just functions and I think we need some way to encode that in the OpenMP dialect so the data can be lowered properly for host and device inside of the OpenMPIRBuilder.

I was assuming that you will be using the same mechanism for global variables as well since global variables also have symbols. Do you see any issues here?

Feb 1 2023, 6:11 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.

It looks like the right thing to do but I think we can remove the MangleNameOnCallOp because it should be updated by the op.replaceAllSymbolUses. That's why you don't see the issue with fir.call right now but if you remove the conversion pattern it should show up.

Thank you, I'll check that out and update the patch, there are fir::GlobalOp and fir::AddrOfOp rewrites as well that may run into a similar issue, do you believe it'd be sensible to remove these and rely on FuncOp to rewrite them with the symbol update from replaceAllSymbolUses or add a replaceAllSymbolUses within both? or alternatively just leave them as is!

You can leave fir::GlobalOp and fir::AddrOfOp for now. At least GlobalOp conversion pattern will have to stay because it is not related to funcOp in any way .

Feb 1 2023, 4:54 AM · Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.
  • [FLANG][MLIR] remove MangleNameOnCallOp
Feb 1 2023, 4:51 AM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.

It looks like the right thing to do but I think we can remove the MangleNameOnCallOp because it should be updated by the op.replaceAllSymbolUses. That's why you don't see the issue with fir.call right now but if you remove the conversion pattern it should show up.

Feb 1 2023, 3:01 AM · Restricted Project, Restricted Project, Restricted Project

Jan 31 2023

agozillon added a comment to D142910: [MLIR][OpenMP][FLANG] Adding MLIR OpenMP dialect Operation for OpenMP's Declare Target.

Used arcanist for the most recent update, hopefully it's done as expected and appended the extra context requested, if not I can try again. Thank you for introducing me to Arcanist, it's a lot smoother than the web API, not sure why I was avoiding it before!

Jan 31 2023, 2:37 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D142910: [MLIR][OpenMP][FLANG] Adding MLIR OpenMP dialect Operation for OpenMP's Declare Target.
  • [MLIR][OpenMP] Add tests for Declare Target op
Jan 31 2023, 2:30 PM · Restricted Project, Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.

Thank you, I've added a test now, in this case I've used func.call, rather than fir.call, it seems to affect the former but not the latter after some testing with and without the change.

F18 never uses func.call and I guess the problem doesn't show up with fir.call because we are also modifying the symbol in fir.call operations. Do you have an example of the initial issue you had in the first place?

Jan 31 2023, 12:11 PM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.

Please add a test.

More than happy to, I wasn't too sure where to add a test for this originally which is why I did not add one, I apologies! Is flang/test/Fir/external-mangling.fir perhaps the best place or is there somewhere more relevant or additional locations? And do you think an apt test would be a FuncOp containing an operation that contains a symbol pointing to the FuncOp and testing if it rewrites the contained symbol after the --external-name-interop pass (if that is the correct pass in this case)?

Thank you very much for your review feedback and help.

No worries. Yes, flang/test/Fir/external-mangling.fir is the right place. A simple funcOp and a fir.call that point to this funcOp should be enough to test this.

Jan 31 2023, 11:38 AM · Restricted Project, Restricted Project, Restricted Project
agozillon updated the diff for D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.

Adding a test that will show regression of the problem. I have used func.call rather than fir.call as these seem to be unaffected but the func.call's appear to display the issue.

Jan 31 2023, 11:36 AM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.

Please add a test.

Jan 31 2023, 6:04 AM · Restricted Project, Restricted Project, Restricted Project
agozillon added a comment to D142910: [MLIR][OpenMP][FLANG] Adding MLIR OpenMP dialect Operation for OpenMP's Declare Target.

More than happy to do that, I will do so after I've completed the requested changes! Do you know if it Is possible to just alter the existing review with new diff data from arcanist or would it require a completely new Phabricator review?

Jan 31 2023, 5:51 AM · Restricted Project, Restricted Project, Restricted Project, Restricted Project

Jan 30 2023

agozillon requested review of D142918: [FLANG][MLIR] Update all module symbol references after changing FuncOp symbol during secondary name mangling.
Jan 30 2023, 10:57 AM · Restricted Project, Restricted Project, Restricted Project