Skip to content

Reintroduce reverted commit "[clang-offload-bundler] Standardize TargetID field for bundler #9631

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

Merged
merged 12 commits into from
Jun 30, 2023

Conversation

asudarsa
Copy link
Contributor

This commit reintroduces the following LLVM open-source PR: https://reviews.llvm.org/D145770
Some changes on top of the community change have been made as well.

Thanks

…etID field for bundler"

This commit reintroduces the following LLVM open-source PR:
https://reviews.llvm.org/D145770
Some changes on top of the community change have been made as well.

Signed-off-by: Arvind Sudarsanam <[email protected]>
@asudarsa asudarsa requested review from a team as code owners May 28, 2023 03:04
@asudarsa asudarsa marked this pull request as draft May 28, 2023 03:05
@asudarsa
Copy link
Contributor Author

Keeping this in draft mode till testing passes. Thanks

@asudarsa asudarsa temporarily deployed to aws May 28, 2023 03:25 — with GitHub Actions Inactive
@asudarsa asudarsa temporarily deployed to aws May 28, 2023 03:46 — with GitHub Actions Inactive
asudarsa added 2 commits May 27, 2023 22:47
Signed-off-by: Arvind Sudarsanam <[email protected]>
Signed-off-by: Arvind Sudarsanam <[email protected]>
@asudarsa asudarsa temporarily deployed to aws May 28, 2023 13:59 — with GitHub Actions Inactive
Signed-off-by: Arvind Sudarsanam <[email protected]>
@asudarsa asudarsa temporarily deployed to aws May 28, 2023 15:11 — with GitHub Actions Inactive
@asudarsa asudarsa temporarily deployed to aws May 28, 2023 15:49 — with GitHub Actions Inactive
Signed-off-by: Arvind Sudarsanam <[email protected]>
@asudarsa asudarsa temporarily deployed to aws May 28, 2023 16:20 — with GitHub Actions Inactive
@asudarsa asudarsa temporarily deployed to aws May 28, 2023 16:58 — with GitHub Actions Inactive
@asudarsa asudarsa temporarily deployed to aws June 9, 2023 00:38 — with GitHub Actions Inactive
@asudarsa asudarsa temporarily deployed to aws June 9, 2023 01:35 — with GitHub Actions Inactive
@asudarsa
Copy link
Contributor Author

asudarsa commented Jun 9, 2023

Two linux failures are unrelated to this PR.
Issues:
#9804
#9766

Investigating the windows failure. Previously the test was marked with
// REQUIRES: powerpc-registered-target which would have prevented this test from running on our x86 targets. So, this failure might have been present without the proposed change as well.

Will investigate further.

Thanks

@asudarsa asudarsa marked this pull request as ready for review June 9, 2023 14:19
@asudarsa asudarsa temporarily deployed to aws June 9, 2023 14:43 — with GitHub Actions Inactive
@asudarsa asudarsa temporarily deployed to aws June 9, 2023 16:18 — with GitHub Actions Inactive
@@ -0,0 +1,10 @@
// REQUIRES: x86-registered-target
// UNSUPPORTED: target={{.*}}-darwin{{.*}}, target={{.*}}-aix{{.*}}, system-windows
Copy link
Contributor

Choose a reason for hiding this comment

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

Why won't this test work for Windows?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As mentioned offline, this test was never running in the past. There are some issues in the way temporary files are generated that causes failure in windows. It is beyond the scope of this change and should be addressed as a separate issue.

Thanks

@@ -5981,7 +5991,7 @@ class OffloadingActionBuilder final {
SectionTriple += "-";
SectionTriple += SyclTarget.BoundArch;
}

SectionTriple = standardizedTriple(SectionTriple);
Copy link
Contributor

Choose a reason for hiding this comment

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

If the bundler is doing the 'standardizing' to determine if the bundled sections are there - why do we need to do any standardizing on the caller side?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here, we are not calling the bundler. We seem to be reading the sections created by bundler directly.

Thanks

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I see - so here we are scanning all of the objects/archives and retrieving the section names. These names could be names that are created with the updated standardized bundler behavior, requiring us to fix up any names for comparisons on the Driver end.

@asudarsa asudarsa requested a review from mdtoguchi June 15, 2023 20:15
@asudarsa
Copy link
Contributor Author

@intel/dpcpp-tools-reviewers

Friendly ping.

Thanks

Signed-off-by: Arvind Sudarsanam <[email protected]>
@asudarsa asudarsa requested a review from maksimsab June 19, 2023 19:36
@asudarsa asudarsa temporarily deployed to aws June 19, 2023 19:52 — with GitHub Actions Inactive
@asudarsa asudarsa temporarily deployed to aws June 19, 2023 20:31 — with GitHub Actions Inactive
@asudarsa
Copy link
Contributor Author

Latest change only added comments. Test failures do not seem to be related to my changes.

Thanks

Copy link
Contributor

@maksimsab maksimsab left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@sarnex sarnex left a comment

Choose a reason for hiding this comment

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

Discussed ESIMD emu test failures with Arvind offline, they are definitely not related to this PR and seem to be a CI issue. These tests should be disabled on the emulator in current HEAD. I didn't review the rest of the change.

@asudarsa
Copy link
Contributor Author

Hi @AlexeySachkov

I have looked at all the failures and none of them are related to my PR. Can you please take a look at this PR and merge if appropriate?

Thanks
Sincerely

@AlexeySachkov
Copy link
Contributor

Hi @AlexeySachkov

I have looked at all the failures and none of them are related to my PR. Can you please take a look at this PR and merge if appropriate?

Thanks Sincerely

I'm a bit hesitant to merge the PR with so many failed tests. Let's take a look at newer results first to make sure that those failures are indeed unrelated

@AlexeySachkov AlexeySachkov temporarily deployed to aws June 29, 2023 12:47 — with GitHub Actions Inactive
@AlexeySachkov AlexeySachkov temporarily deployed to aws June 29, 2023 15:13 — with GitHub Actions Inactive
@AlexeySachkov
Copy link
Contributor

Fails:

********************
Failed Tests (1):
  SYCL :: ESIMD/accessor_local.cpp

Covered by #10138

********************
Failed Tests (4):
  SYCL :: USM/memops2d/copy2d_device_to_host.cpp
  SYCL :: USM/memops2d/copy2d_host_to_device.cpp
  SYCL :: USM/memops2d/memcpy2d_device_to_host.cpp
  SYCL :: USM/memops2d/memcpy2d_host_to_device.cpp

Covered by #10157

@AlexeySachkov AlexeySachkov merged commit d10a290 into intel:sycl Jun 30, 2023
@steffenlarsen
Copy link
Contributor

@asudarsa - clang/test/Driver/clang-offload-bundler-standardize.c is failing in post-commit after this change. Could you please address this ASAP?

@dm-vodopyanov
Copy link
Contributor

@asudarsa ping, the post-commit is red for 6 days because of this.

@asudarsa
Copy link
Contributor Author

asudarsa commented Jul 6, 2023

Looking at this now. It looks mostly like a issue in options being handled by driver.
Thanks.

dm-vodopyanov added a commit that referenced this pull request Jul 6, 2023
AlexeySachkov pushed a commit that referenced this pull request Jul 28, 2023
This patch fixes small issues after
#9631

When standardizing the triples the format should be:

```
<arch><sub>-<vendor>-<sys>-<env>
```

* https://clang.llvm.org/docs/CrossCompilation.html#target-triple

And then we add our offload arch afterwards, so the final triples should
look something like: `nvptx64-nvidia-cuda--sm_50`, instead of
`nvptx64-nvidia-cuda-sm_50-`.

In addition never skip standardization so that triples like
`nvptx64-nvidia-cuda-`, are also properly standardized to
`nvptx64-nvidia-cuda--`.
asudarsa added a commit to asudarsa/llvm-2 that referenced this pull request Aug 23, 2023
…ize TargetID field for bundler (intel#9631)"

This reverts commit d10a290.
AlexeySachkov pushed a commit that referenced this pull request Aug 24, 2023
…ad-bundler] Standardize TargetID field for bundler (#9631)"" (#10950)

This reverts commit d10a290.

When the compiler encounters library files built with older compiler, it
is not able to understand the old triple and hence fails to grab the
library files. This issue needs to be root-caused before trying to
submit this again.

Thanks

---------

Signed-off-by: Sudarsanam, Arvind <[email protected]>
mdtoguchi pushed a commit to mdtoguchi/llvm that referenced this pull request Oct 18, 2023
This patch fixes small issues after
intel#9631

When standardizing the triples the format should be:

```
<arch><sub>-<vendor>-<sys>-<env>
```

* https://clang.llvm.org/docs/CrossCompilation.html#target-triple

And then we add our offload arch afterwards, so the final triples should
look something like: `nvptx64-nvidia-cuda--sm_50`, instead of
`nvptx64-nvidia-cuda-sm_50-`.

In addition never skip standardization so that triples like
`nvptx64-nvidia-cuda-`, are also properly standardized to
`nvptx64-nvidia-cuda--`.
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.

8 participants