Repository navigation
Allow querying free/total memory for SYCL - #1225
Conversation
|
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
|
This works reasonably well for me as a workaround. Unfortunately, we currently need to build with shared libraries for which I have introduced another @brian-kelley Would you mind checking if that works for you running, e.g. |
|
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
985dcb0 to
5fd3790
Compare
|
@masterleinad Yes, that worked, thanks! The only caveat was I had to do |
srajama1
left a comment
There was a problem hiding this comment.
@masterleinad : Is there some reference for this memory module business?
See https://spec.oneapi.io/level-zero/latest/sysman/api.html#zesdeviceenummemorymodules and https://spec.oneapi.io/level-zero/latest/sysman/api.html#zesmemorygetproperties. It's hard to find precise information and I would consider the functionality provided here fairly brittle but it seems to work well enough for the tests to pass until https://github.com/intel/llvm/blob/sycl/sycl/doc/extensions/LevelZeroBackend/LevelZeroBackend.md#51-device-information-descriptors is actually implemented in the compiler. |
5fd3790 to
0a692fb
Compare
|
It would be great if we can think about this being considered for the next release. |
|
Status Flag 'Pre-Test Inspection' - - This Pull Request Requires Inspection... The code must be inspected by a member of the Team before Testing/Merging |
Just needs kokkos#1225 to allow querying free/total memory. This will make spgemm, spgemm-jacobi and block GS tests pass. replaceSumIntoLonger still has a runtime error (too many registers used by arrays?), so that is disabled for now.
Just needs kokkos#1225 to allow querying free/total memory. This will make spgemm, spgemm-jacobi and block GS tests pass. replaceSumIntoLonger still has a runtime error (too many registers used by arrays?), so that is disabled for now.
Just needs kokkos#1225 to allow querying free/total memory. This will make spgemm, spgemm-jacobi and block GS tests pass. replaceSumIntoLonger still has a runtime error (too many registers used by arrays?), so that is disabled for now.
Just needs kokkos#1225 to allow querying free/total memory. This will make spgemm, spgemm-jacobi and block GS tests pass. replaceSumIntoLonger still has a runtime error (too many registers used by arrays?), so that is disabled for now.
|
@masterleinad would you mind rebasing on top of develop? |
0a692fb to
5a8e014
Compare
|
Rebased. |
| IF (NOT BUILD_SHARED_LIBS) | ||
| MESSAGE(SEND_ERROR | ||
| "At the moment, we require KokkosKernels (and Kokkos) to be built as " | ||
| "shared libraries to allow querying free and total device memory!" | ||
| ) | ||
| ENDIF() |
There was a problem hiding this comment.
Note that this is a new restriction that may surprise users already using SYCL.
| INCLUDE(cmake/fake_tribits.cmake) | ||
| INCLUDE(cmake/kokkoskernels_tribits.cmake) | ||
|
|
||
| OPTION(BUILD_SHARED_LIBS "Build shared libraries" OFF) |
There was a problem hiding this comment.
This will change the default build behavior of Kokkos Kernels which does a shared library build by default.
Is this change required for your fix?
There was a problem hiding this comment.
Oh, really? In fact, this patch requires building with shared libraries, see https://github.com/masterleinad/kokkos-kernels/blob/5a8e0146189c898551662b0ac9b1e2c580bfaa14/src/CMakeLists.txt#L470. I can check tomorrow if the on;y problem was that Kokkos didn't get built as a shared library.
There was a problem hiding this comment.
Actually after double checking, we are building static libraries by default so this line should not change anything.
|
Status Flag 'Pre-Test Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED by label AT: PRE-TEST INSPECTED! Autotester is Removing Label; This inspection will remain valid until a new commit to source branch is performed. |
|
Status Flag 'Pull Request AutoTester' - Testing Jenkins Projects: Pull Request Auto Testing STARTING (click to expand)Build InformationTest Name: KokkosKernels_PullRequest_Tpls_CUDA9_GCC720_Light_Tpls_GCC720_GCC740
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_CUDA10_Tpls_CUDA10_LayoutRight
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_GCC720
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_GCC720_Light_LayoutRight
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_GCC720
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_INTEL18
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_CLANG1001
Jenkins Parameters
Using Repos:
Pull Request Author: masterleinad |
|
Status Flag 'Pull Request AutoTester' - Jenkins Testing: all Jobs PASSED Pull Request Auto Testing has PASSED (click to expand)Build InformationTest Name: KokkosKernels_PullRequest_Tpls_CUDA9_GCC720_Light_Tpls_GCC720_GCC740
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_CUDA10_Tpls_CUDA10_LayoutRight
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_GCC720
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_GCC720_Light_LayoutRight
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_GCC720
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_Tpls_INTEL18
Jenkins Parameters
Build InformationTest Name: KokkosKernels_PullRequest_CLANG1001
Jenkins Parameters
|
|
Status Flag 'Pre-Merge Inspection' - SUCCESS: The last commit to this Pull Request has been INSPECTED AND APPROVED by [ lucbv ]! |
|
Status Flag 'Pull Request AutoTester' - Pull Request MUST BE MERGED MANUALLY BY Project Team - This Repo does not support Automerge |
sivascience
left a comment
There was a problem hiding this comment.
Thanks @masterleinad ! Looks good to me.
Just needs kokkos#1225 to allow querying free/total memory. This will make spgemm, spgemm-jacobi and block GS tests pass. replaceSumIntoLonger still has a runtime error (too many registers used by arrays?), so that is disabled for now.
* Get sparse tests enabled and working for SYCL Just needs #1225 to allow querying free/total memory. This will make spgemm, spgemm-jacobi and block GS tests pass. replaceSumIntoLonger still has a runtime error (too many registers used by arrays?), so that is disabled for now. * Added --shared option to cm_generate_makefile to build Kokkos and KokkosKernels as shared libraries. Static libraries are still the default. This option is useful because SYCL builds on Intel now require a shared library build.
This is an intermediate solution for #1062 until the functionality is properly supported in the compiler.
Currently, there are some issues with using
Sysman.