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 #1111: spmv tpl instantiations #1112

Merged
merged 1 commit into from
Sep 22, 2021
Merged

Conversation

brian-kelley
Copy link
Contributor

Use KOKKOS_COMPILE_LIBRARY (true while building library, and false when external app is using prebuilt libkokkoskernels)
as the "eti avail" template parameter for SpMV TPL wrappers (cuSPARSE and MKL). Before, this was hardcoded to true,
causing undefined reference errors when the TPL was available but ETI was not. Since spmv_eti_spec_avail<...>::value was false, it was trying to call SPMV<..., true, false> but only SPMV<..., true, true> could actually be instantiated on demand because of the hardcoding.

Tested by building the spmv example with cuSPARSE (with and without ETI) and with MKL (again with and without ETI). All of these behaved as expected (TPL was called correctly when available).

Use KOKKOS_COMPILE_LIBRARY (true while building library, and false when external app is using prebuilt library)
as the "eti avail" template parameter for SpMV TPL definitions (cuSPARSE and MKL). Before was hardcoded to true,
but this caused undefined reference errors when the TPL was available but ETI was not.
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.

Yeah, this makes sense, thank Brian

@kokkos-devops-admin
Copy link

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

@brian-kelley
Copy link
Contributor Author

brian-kelley commented Sep 21, 2021

@lucbv Thanks for looking so quickly. This was basically a mistake I made a long time ago, since it didn't make sense to instantiate every wrapper twice (eti_avail = true or false). That isn't really correct either (it will work, and the wrappers are usually very simple, but it's still extra code size). The gemm wrapper for example still does that so we can make it use KOKKOSKERNELS_IMPL_COMPILE_LIBRARY like this PR at some point.

@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_GCC720_Light

  • Build Num: 68
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC720

  • Build Num: 446
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC720_Light_LayoutRight

  • Build Num: 93
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_GCC720

  • Build Num: 437
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_CUDA10

  • Build Num: 68
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_INTEL18

  • Build Num: 423
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_CUDA10_LayoutRight

  • Build Num: 67
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_CUDA9

  • Build Num: 65
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_GCC720_GCC740

  • Build Num: 59
  • Status: STARTED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Using Repos:

Repo: KOKKOSKERNELS (brian-kelley/kokkos-kernels)
  • Branch: Fix1111
  • SHA: d4fa4a3
  • Mode: TEST_REPO

Pull Request Author: brian-kelley

@lucbv
Copy link
Contributor

lucbv commented Sep 22, 2021

Yeah I have not thought the KOKKOSKERNELS_IMPL_COMPILE_LIBRARY fully, we do this thing to make ETI ON and OFF work but the details are a bit tricky. We might want to write them down at some point...

@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_GCC720_Light

  • Build Num: 68
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC720

  • Build Num: 446
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_GCC720_Light_LayoutRight

  • Build Num: 93
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_GCC720

  • Build Num: 437
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_CUDA10

  • Build Num: 68
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_INTEL18

  • Build Num: 423
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_CUDA10_LayoutRight

  • Build Num: 67
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_CUDA9

  • Build Num: 65
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
TEST_REPO_ALIAS KOKKOSKERNELS

Build Information

Test Name: KokkosKernels_PullRequest_Tpls_GCC720_GCC740

  • Build Num: 59
  • Status: PASSED

Jenkins Parameters

Parameter Name Value
KOKKOSKERNELS_SOURCE_BRANCH Fix1111
KOKKOSKERNELS_SOURCE_REPO https://github.com/brian-kelley/kokkos-kernels
KOKKOSKERNELS_SOURCE_SHA d4fa4a3
KOKKOSKERNELS_TARGET_BRANCH develop
KOKKOSKERNELS_TARGET_REPO https://github.com/kokkos/kokkos-kernels
KOKKOSKERNELS_TARGET_SHA 4faf97b
PR_LABELS bug
PULLREQUESTNUM 1112
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

@lucbv lucbv merged commit d83f699 into kokkos:develop Sep 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants