Skip to content

Commit

Permalink
Merge branch 'develop' into jgfouca/block_sptrsv2
Browse files Browse the repository at this point in the history
* develop: (32 commits)
  Bigger sptrsv cleanup (kokkos#2280)
  init (kokkos#2273)
  Unify alignPtrTo implementation (kokkos#2275)
  Sycl gemv beta (kokkos#2276)
  Sparse - SpMV: removing calls to unsuported oneapi - MKL functions (kokkos#2274)
  A little sptrsv cleanup before the main block effort (kokkos#2247)
  Implement batched serial pttrf (kokkos#2256)
  BLAS - gemv: using fallback when mode is 't' or 'c' and onemkl is used (kokkos#2272)
  Workarounds for removed cusparse functions (kokkos#2270)
  handle_t* -> unique_ptr<handle_t> in Bsr SpMV unit tests (kokkos#2269)
  Bump actions/upload-artifact from 4.3.3 to 4.3.4 (kokkos#2266)
  Help gcc/8.3 with ctad issue
  sycl: use alternative `alignPtrTo` when SYCL is enabled (SpGEMM) (kokkos#2262)
  sparse: spadd_symbolic fences before device values used on host (kokkos#2259)
  Bump github/codeql-action from 3.25.10 to 3.25.11 (kokkos#2263)
  Rename `Impl::alignPtr` to `Impl::alignPtrTo`, allow it to infer argument type (kokkos#2261)
  sparse: replace macros with constexpr bools (kokkos#2260)
  spgemm: add profiling regions to native implementations (kokkos#2253)
  RCM fixes, improvements (kokkos#2254)
  Fix warning about memcpy (kokkos#2252)
  ...
  • Loading branch information
jgfouca committed Jul 17, 2024
2 parents 616fa9c + c93b6dc commit ce96745
Show file tree
Hide file tree
Showing 68 changed files with 3,440 additions and 1,530 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/bdw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,12 +188,12 @@ jobs:

steps:
- name: checkout_kokkos_kernels
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: kokkos-kernels

- name: checkout_kokkos
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: kokkos/kokkos
ref: ${{ github.base_ref }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ jobs:
egress-policy: audit

- name: checkout_kokkos_kernels
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: kokkos-kernels

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
uses: github/codeql-action/init@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
languages: c-cpp
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

- name: checkout_kokkos
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: 'kokkos/kokkos'
path: 'kokkos'
Expand Down Expand Up @@ -100,6 +100,6 @@ jobs:
run: make -j2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
uses: github/codeql-action/analyze@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
category: "/language:c-cpp"
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ jobs:
egress-policy: audit

- name: 'Checkout Repository'
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: 'Dependency Review'
uses: actions/dependency-review-action@72eb03d02c7872a771aacd928f3123ac62ad6d3a # v4.3.3
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ jobs:
doxygen --version
- name: checkout_kokkos_kernels
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: kokkos-kernels

- name: checkout_kokkos
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: kokkos/kokkos
ref: 4.3.00
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
clang-format-check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7

- name: Install Dependencies
run: sudo apt install clang-format-8
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/h100.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:

steps:
- name: checkout_kokkos_kernels
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: kokkos-kernels

- name: checkout_kokkos
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: kokkos/kokkos
ref: ${{ github.base_ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mi210.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,12 @@ jobs:

steps:
- name: checkout_kokkos_kernels
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: kokkos-kernels

- name: checkout_kokkos
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: kokkos/kokkos
ref: ${{ github.base_ref }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ jobs:

steps:
- name: checkout_kokkos_kernels
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: kokkos-kernels

- name: checkout_kokkos
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: kokkos/kokkos
ref: 4.3.00
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/scorecards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
egress-policy: audit

- name: "Checkout code"
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
persist-credentials: false

Expand All @@ -65,14 +65,14 @@ jobs:
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
# format to the repository Actions tab.
- name: "Upload artifact"
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4
with:
name: SARIF file
path: results.sarif
retention-days: 5

# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@2e230e8fe0ad3a14a340ad0815ddb96d599d2aff # v3.25.8
uses: github/codeql-action/upload-sarif@b611370bb5703a7efb587f9d136a52ea24c5c38c # v3.25.11
with:
sarif_file: results.sarif
4 changes: 2 additions & 2 deletions .github/workflows/spr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,12 @@ jobs:

steps:
- name: checkout_kokkos_kernels
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
path: kokkos-kernels

- name: checkout_kokkos
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
repository: kokkos/kokkos
ref: ${{ github.base_ref }}
Expand Down
73 changes: 73 additions & 0 deletions batched/dense/impl/KokkosBatched_Pttrf_Serial_Impl.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
//@HEADER
// ************************************************************************
//
// Kokkos v. 4.0
// Copyright (2022) National Technology & Engineering
// Solutions of Sandia, LLC (NTESS).
//
// Under the terms of Contract DE-NA0003525 with NTESS,
// the U.S. Government retains certain rights in this software.
//
// Part of Kokkos, under the Apache License v2.0 with LLVM Exceptions.
// See https://kokkos.org/LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//@HEADER
#ifndef KOKKOSBATCHED_PTTRF_SERIAL_IMPL_HPP_
#define KOKKOSBATCHED_PTTRF_SERIAL_IMPL_HPP_

#include <KokkosBatched_Util.hpp>
#include "KokkosBatched_Pttrf_Serial_Internal.hpp"

/// \author Yuuichi Asahi (yuuichi.asahi@cea.fr)

namespace KokkosBatched {

template <typename DViewType, typename EViewType>
KOKKOS_INLINE_FUNCTION static int checkPttrfInput(
[[maybe_unused]] const DViewType &d, [[maybe_unused]] const EViewType &e) {
static_assert(Kokkos::is_view<DViewType>::value,
"KokkosBatched::pttrf: DViewType is not a Kokkos::View.");
static_assert(Kokkos::is_view<EViewType>::value,
"KokkosBatched::pttrf: EViewType is not a Kokkos::View.");

static_assert(DViewType::rank == 1,
"KokkosBatched::pttrf: DViewType must have rank 1.");
static_assert(EViewType::rank == 1,
"KokkosBatched::pttrf: EViewType must have rank 1.");

#if (KOKKOSKERNELS_DEBUG_LEVEL > 0)
const int nd = d.extent(0);
const int ne = e.extent(0);

if (ne + 1 != nd) {
Kokkos::printf(
"KokkosBatched::pttrf: Dimensions of d and e do not match: d: %d, e: "
"%d \n"
"e.extent(0) must be equal to d.extent(0) - 1\n",
nd, ne);
return 1;
}
#endif
return 0;
}

template <>
struct SerialPttrf<Algo::Pttrf::Unblocked> {
template <typename DViewType, typename EViewType>
KOKKOS_INLINE_FUNCTION static int invoke(const DViewType &d,
const EViewType &e) {
// Quick return if possible
if (d.extent(0) == 0) return 0;
if (d.extent(0) == 1) return (d(0) < 0 ? 1 : 0);

auto info = checkPttrfInput(d, e);
if (info) return info;

return SerialPttrfInternal<Algo::Pttrf::Unblocked>::invoke(
d.extent(0), d.data(), d.stride(0), e.data(), e.stride(0));
}
};
} // namespace KokkosBatched

#endif // KOKKOSBATCHED_PTTRF_SERIAL_IMPL_HPP_
Loading

0 comments on commit ce96745

Please sign in to comment.