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

Fix #1891 #1927

Merged
merged 1 commit into from
Aug 2, 2023
Merged

Fix #1891 #1927

merged 1 commit into from
Aug 2, 2023

Conversation

brian-kelley
Copy link
Contributor

(HashmapAccumulator data races on Ada and Hopper architectures). To avoid checking for every architecture at every location, add a new macro KOKKOSKERNELS_CUDA_INDEPENDENT_THREADS which is defined if we're targeting an architecture with independent thread scheduling (Volta, Ampere, Turing, Ada, Hopper, and any future ones).

(HashmapAccumulator data races on Ada and Hopper architectures).
To avoid checking for every architecture at every location, add a
new macro KOKKOSKERNELS_CUDA_INDEPENDENT_THREADS which is defined
if we're targeting an architecture with independent thread scheduling.
Copy link
Contributor

@lucbv lucbv left a comment

Choose a reason for hiding this comment

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

In general this looks fine to me but also prompts the question: is this something unique to NVIDIA GPUs or is it also the case on some AMD/Intel GPUs?

@brian-kelley
Copy link
Contributor Author

AFAIK it's only NVIDIA hardware that can do this, wavefronts/subgroups behave like SIMDs (all lanes are executing the same instruction at any given time).

@kokkos-devops-admin
Copy link

Status Flag 'Pre-Test Inspection' - Auto Inspected - Inspection is Not Necessary for this Pull Request.

@kokkos-devops-admin
Copy link

Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects:

Pull Request Auto Testing STARTING (click to expand)

Build Information

Test Name: KokkosKernels_PullRequest_CUDA11_CUDA11_LayoutRight

  • Build Num: 789
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC930_Light_Tpls_GCC930_Tpls_CLANG13CUDA10

  • Build Num: 380
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GNU1021

  • Build Num: 53
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GNU1021_Light_LayoutRight

  • Build Num: 52
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_GNU1021

  • Build Num: 52
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_INTEL19_solo

  • Build Num: 58
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_CLANG1001_solo

  • Build Num: 47
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_A64FX_Tpls_ARMPL2110

  • Build Num: 559
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_A64FX_GCC1020

  • Build Num: 554
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_VEGA908_ROCM520

  • Build Num: 553
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_VEGA908_Tpls_ROCM520

  • Build Num: 75
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Using Repos:

Repo: KOKKOSKERNELS (brian-kelley/kokkos-kernels)
  • Branch: Fix1891
  • SHA: 2d1a0fb
  • Mode: TEST_REPO

Pull Request Author: brian-kelley

@kokkos-devops-admin
Copy link

Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED

Pull Request Auto Testing has PASSED (click to expand)

Build Information

Test Name: KokkosKernels_PullRequest_CUDA11_CUDA11_LayoutRight

  • Build Num: 789
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC930_Light_Tpls_GCC930_Tpls_CLANG13CUDA10

  • Build Num: 380
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GNU1021

  • Build Num: 53
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GNU1021_Light_LayoutRight

  • Build Num: 52
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_GNU1021

  • Build Num: 52
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_INTEL19_solo

  • Build Num: 58
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_CLANG1001_solo

  • Build Num: 47
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_A64FX_Tpls_ARMPL2110

  • Build Num: 559
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_A64FX_GCC1020

  • Build Num: 554
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_VEGA908_ROCM520

  • Build Num: 553
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_VEGA908_Tpls_ROCM520

  • Build Num: 75
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA 2d1a0fb
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 95be1a4
PR_LABELS
PULLREQUESTNUM 1927
TEST_REPO_ALIAS KOKKOSKERNELS

@kokkos-devops-admin
Copy link

Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ lucbv ]!

@kokkos-devops-admin
Copy link

Status Flag 'Pull Request AutoTester' - Pull Request MUST BE MERGED MANUALLY BY Project Team - This Repo does not support Automerge

@bathmatt
Copy link

bathmatt commented Aug 2, 2023

Verify this fixes my trilinos bug. Thanks

@lucbv
Copy link
Contributor

lucbv commented Aug 2, 2023

Thanks @bathmatt then I'll merge this and we can work on a Trilinos snapshot if @brian-kelley has not started on it already!

@lucbv lucbv merged commit efac9bf into kokkos:develop Aug 2, 2023
@bathmatt
Copy link

bathmatt commented Aug 2, 2023

Awesome !!! I've got it snapped into my local branch of trilinos.

@brian-kelley
Copy link
Contributor Author

@lucbv i just put up a patch here: trilinos/Trilinos#12097

@lucbv
Copy link
Contributor

lucbv commented Aug 2, 2023

Thanks @brian-kelley in general we could make the assumption that all new NVIDIA GPUs will support this thread level scheduling and reverse the logic of your macro, something like

#if defined(KOKKOS_ENABLE_CUDA) && (!defined(OLD_NVIDIA_ARCHS)...)
#define KOKKOSKERNELS_CUDA_INDEPENDENT_THREADS

This would avoid having to update the macro every time a new GPU comes out?

@ndellingwood ndellingwood added the TrilinosPatchMatch Apply this label for PR's mirroring changes submitted directly to Trilinos label Aug 3, 2023
@ndellingwood
Copy link
Contributor

Marking with TrilinosPatchMatch to track so the Trilinos changes are not clobbered in the event we issue a patch release (see PR trilinos/Trilinos#12097)

@brian-kelley brian-kelley deleted the Fix1891 branch September 8, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
TrilinosPatchMatch Apply this label for PR's mirroring changes submitted directly to Trilinos
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants