- User Since
- Jan 31 2013, 4:40 AM (341 w, 3 d)
Fri, Aug 16
Thu, Aug 15
Wed, Aug 14
Why there are the changes from the another patch?
What about very long vectors that do no fit into single register? Is it cost effective for such vectors too?
Do we really need to map such variables? According to standard, "The map clause specifies how an original list item is mapped from the current task’s data environment to a corresponding list item in the device data environment of the device identified by the construct.", i.e. it does not map the variable, but "specifies" how to map it.
Reworked to keep partial linking to make original host object available for analysis without unbundling.
Tue, Aug 13
What about namong convention here? Shall we use capital letters for the var names or it is fine as is? Also, did you come to an agreement about design, directory layout etc.?
Also, there is a clang unit test that fails because of the same reason. Can I include the changes in this test into this patch too or better to make a separate patch? The test is unittests/Basic/FileManagerTest.cpp
std::error_code works correctly, it is std::make_error_code leads to something strange in some cases.
Sun, Aug 11
Sat, Aug 10
Fri, Aug 9
Thu, Aug 8
I want to be sure we're on the same page: For OpenMP 5.0, should we allow is_device_ptr with the private clauses?
Additional note. Seems to me, it has something to do with the partial linking. According to ld documentation, it is recommended to use -Ur option for partial linking of the C++ object files to resolve global constructors.
-Ur For anything other than C++ programs, this option is equivalent to '-r': it generates relocatable output--i.e., an output file that can in turn serve as input to ld. When linking C++ programs, `-Ur' does resolve references to constructors, unlike '-r'. It does not work to use '-Ur' on files that were themselves linked with `-Ur'; once the constructor table has been built, it cannot be added to. Use `-Ur' only for the last partial link, and '-r' for the others.
The problem I saw is exactly connected with the global constructors, which are not called after partial linking.
Seems to me, we partially link objects files for C++ with -Ur option but we cannot say if this the last time we perform partial linking or not (we may try to bundle/unbundle objects several times, especially when we'll try to support linking with libraries). Better not to use partial linking in bundler.
Wed, Aug 7
I should have reported that the current implementation isn't complete for OpenMP 4.5. For example, on target teams, reduction(+:x) map(x) is an error but not map(x) reduction(+:x). So there are bugs to fix, and maybe this will evolve into multiple patches, but I want to be sure I'm on the right path first.
Maybe, but I haven't found any statement in either version that states that map restrictions apply to is_device_ptr.
is_device_ptr is a kind of mapping clause. I assume we can extend the restrictions for map clause to this clause too.
is_device_ptr can be considered as a kind of mapping clause (see 2.19.7 Data-Mapping Attribute Rules, Clauses, and Directives), so, I assume, clang correct here in terms of OpenMP 4.5.
Thus, I would not call this a "fix", this is just a new feature from OpenMP 5.0.
Plus, these changes are not enough to support this new feature from OpenMP 5.0. There definitely must be some changes in the codegen. If the variable is mapped in the target construct, we should not generate a code for the private clause of this variable on the target construct, since, in this case, private clauses are applied for the inner subdirectives, which are the part of the combined directive, but not the target part of the directive.
I would suggest at first to come to an agreement on the design of this reworked library at first.
Tue, Aug 6