Skip to content

Commit f0f7837

Browse files
Merge pull request #1852 from IntelPython/technical-debt
Technical debt
2 parents 9085854 + c04db57 commit f0f7837

30 files changed

+97
-54
lines changed

dpctl/apis/include/dpctl4pybind11.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727

2828
#include "dpctl_capi.h"
2929
#include <complex>
30-
#include <exception>
3130
#include <memory>
3231
#include <pybind11/pybind11.h>
32+
#include <stdexcept>
3333
#include <sycl/sycl.hpp>
3434
#include <utility>
3535
#include <vector>

dpctl/tensor/libtensor/include/kernels/accumulators.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <array>
2727
#include <cstdint>
2828
#include <limits>
29+
#include <new>
2930
#include <sycl/sycl.hpp>
3031
#include <utility>
3132
#include <vector>

dpctl/tensor/libtensor/include/kernels/copy_as_contiguous.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ as_c_contiguous_array_generic_impl(sycl::queue &exec_q,
173173

174174
sycl::event copy_ev = exec_q.submit([&](sycl::handler &cgh) {
175175
cgh.depends_on(depends);
176+
cgh.use_kernel_bundle(kb);
176177

177178
const sycl::range<1> gRange{n_groups * lws};
178179
const sycl::range<1> lRange{lws};

dpctl/tensor/libtensor/include/kernels/elementwise_functions/common.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#pragma once
2626
#include <cstddef>
2727
#include <cstdint>
28+
#include <stdexcept>
2829
#include <sycl/sycl.hpp>
2930
#include <utility>
3031

dpctl/tensor/libtensor/include/kernels/elementwise_functions/common_inplace.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#pragma once
2727
#include <cstddef>
2828
#include <cstdint>
29+
#include <stdexcept>
2930
#include <sycl/sycl.hpp>
3031

3132
#include "kernels/alignment.hpp"

dpctl/tensor/libtensor/include/kernels/linalg_functions/dot_product.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <complex>
2828
#include <cstddef>
2929
#include <cstdint>
30+
#include <stdexcept>
3031
#include <sycl/sycl.hpp>
3132
#include <type_traits>
3233
#include <utility>

dpctl/tensor/libtensor/include/kernels/linalg_functions/gemm.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#include <complex>
2828
#include <cstddef>
2929
#include <cstdint>
30+
#include <stdexcept>
3031
#include <sycl/sycl.hpp>
3132
#include <type_traits>
3233
#include <utility>
@@ -1349,6 +1350,8 @@ sycl::event _gemm_batch_nm_impl(sycl::queue &exec_q,
13491350
sycl::event gemm_ev = exec_q.submit([&](sycl::handler &cgh) {
13501351
cgh.depends_on(depends);
13511352

1353+
cgh.use_kernel_bundle(kb);
1354+
13521355
using LocAccT1 = sycl::local_accessor<resTy, 1>;
13531356
LocAccT1 local_A_block(wg_delta_n * wi_delta_n * wi_delta_k, cgh);
13541357

dpctl/tensor/libtensor/include/kernels/reductions.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
#include <complex>
2727
#include <cstddef>
2828
#include <cstdint>
29+
#include <stdexcept>
2930
#include <sycl/sycl.hpp>
3031
#include <type_traits>
3132
#include <utility>

dpctl/tensor/libtensor/include/utils/output_validation.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
//===----------------------------------------------------------------------===//
2626

2727
#pragma once
28+
#include <stdexcept>
29+
2830
#include "dpctl4pybind11.hpp"
2931
#include <pybind11/pybind11.h>
3032

dpctl/tensor/libtensor/include/utils/type_dispatch.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
//===----------------------------------------------------------------------===//
2424

2525
#pragma once
26+
#include <stdexcept>
2627

2728
#include "dpctl4pybind11.hpp"
2829
#include "type_dispatch_building.hpp"

dpctl/tensor/libtensor/include/utils/type_utils.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
#pragma once
2626
#include <complex>
27-
#include <exception>
27+
#include <stdexcept>
2828
#include <sycl/sycl.hpp>
2929
#include <utility>
3030

dpctl/tensor/libtensor/source/accumulators.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@
2222
/// This file defines functions of dpctl.tensor._tensor_impl extensions
2323
//===----------------------------------------------------------------------===//
2424

25-
#include "dpctl4pybind11.hpp"
2625
#include <cstdint>
2726
#include <limits>
28-
#include <pybind11/pybind11.h>
29-
#include <pybind11/stl.h>
27+
#include <stdexcept>
3028
#include <sycl/sycl.hpp>
3129
#include <utility>
3230
#include <vector>
3331

32+
#include "dpctl4pybind11.hpp"
33+
#include <pybind11/pybind11.h>
34+
#include <pybind11/stl.h>
35+
3436
#include "kernels/accumulators.hpp"
3537
#include "simplify_iteration_space.hpp"
3638
#include "utils/memory_overlap.hpp"

dpctl/tensor/libtensor/source/accumulators/accumulate_over_axis.hpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,18 @@
2424

2525
#pragma once
2626

27-
#include "dpctl4pybind11.hpp"
2827
#include <cstdint>
2928
#include <limits>
30-
#include <pybind11/numpy.h>
31-
#include <pybind11/pybind11.h>
32-
#include <pybind11/stl.h>
29+
#include <stdexcept>
3330
#include <sycl/sycl.hpp>
3431
#include <utility>
3532
#include <vector>
3633

34+
#include "dpctl4pybind11.hpp"
35+
#include <pybind11/numpy.h>
36+
#include <pybind11/pybind11.h>
37+
#include <pybind11/stl.h>
38+
3739
#include "kernels/accumulators.hpp"
3840
#include "simplify_iteration_space.hpp"
3941
#include "utils/memory_overlap.hpp"

dpctl/tensor/libtensor/source/boolean_advanced_indexing.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,17 @@
2323
/// dpctl.tensor.extract, dpctl.tensor.nonzero
2424
//===----------------------------------------------------------------------===//
2525

26-
#include "dpctl4pybind11.hpp"
2726
#include <cstdint>
2827
#include <limits>
29-
#include <pybind11/pybind11.h>
30-
#include <pybind11/stl.h>
28+
#include <stdexcept>
3129
#include <sycl/sycl.hpp>
3230
#include <utility>
3331
#include <vector>
3432

33+
#include "dpctl4pybind11.hpp"
34+
#include <pybind11/pybind11.h>
35+
#include <pybind11/stl.h>
36+
3537
#include "boolean_advanced_indexing.hpp"
3638
#include "kernels/boolean_advanced_indexing.hpp"
3739
#include "simplify_iteration_space.hpp"

dpctl/tensor/libtensor/source/clip.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,16 @@
2323
/// dpctl.tensor.clip
2424
//===----------------------------------------------------------------------===//
2525

26-
#include "dpctl4pybind11.hpp"
2726
#include <complex>
2827
#include <cstdint>
28+
#include <stdexcept>
29+
#include <sycl/sycl.hpp>
30+
#include <utility>
31+
32+
#include "dpctl4pybind11.hpp"
2933
#include <pybind11/complex.h>
3034
#include <pybind11/pybind11.h>
3135
#include <pybind11/stl.h>
32-
#include <sycl/sycl.hpp>
33-
#include <utility>
3436

3537
#include "clip.hpp"
3638
#include "kernels/clip.hpp"

dpctl/tensor/libtensor/source/copy_and_cast_usm_to_usm.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,17 @@
2525
#include <algorithm>
2626
#include <complex>
2727
#include <cstdint>
28-
#include <pybind11/complex.h>
29-
#include <pybind11/numpy.h>
30-
#include <pybind11/pybind11.h>
31-
#include <pybind11/stl.h>
28+
#include <stdexcept>
3229
#include <sycl/sycl.hpp>
3330
#include <thread>
3431
#include <type_traits>
3532
#include <utility>
3633

3734
#include "dpctl4pybind11.hpp"
35+
#include <pybind11/complex.h>
36+
#include <pybind11/numpy.h>
37+
#include <pybind11/pybind11.h>
38+
#include <pybind11/stl.h>
3839

3940
#include "kernels/copy_and_cast.hpp"
4041
#include "utils/memory_overlap.hpp"

dpctl/tensor/libtensor/source/copy_for_reshape.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,20 @@
2222
/// This file defines functions of dpctl.tensor._tensor_impl extensions
2323
//===----------------------------------------------------------------------===//
2424

25+
#include <stdexcept>
2526
#include <sycl/sycl.hpp>
2627
#include <utility>
2728
#include <vector>
2829

29-
#include "copy_for_reshape.hpp"
3030
#include "dpctl4pybind11.hpp"
31+
#include <pybind11/pybind11.h>
32+
33+
#include "copy_for_reshape.hpp"
3134
#include "kernels/copy_and_cast.hpp"
3235
#include "utils/offset_utils.hpp"
3336
#include "utils/output_validation.hpp"
3437
#include "utils/sycl_alloc_utils.hpp"
3538
#include "utils/type_dispatch.hpp"
36-
#include <pybind11/pybind11.h>
3739

3840
namespace dpctl
3941
{

dpctl/tensor/libtensor/source/copy_for_roll.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,20 @@
2222
/// This file defines functions of dpctl.tensor._tensor_impl extensions
2323
//===----------------------------------------------------------------------===//
2424

25+
#include <stdexcept>
2526
#include <sycl/sycl.hpp>
2627
#include <utility>
2728
#include <vector>
2829

29-
#include "copy_for_roll.hpp"
3030
#include "dpctl4pybind11.hpp"
31+
#include <pybind11/pybind11.h>
32+
33+
#include "copy_for_roll.hpp"
3134
#include "kernels/copy_and_cast.hpp"
3235
#include "utils/offset_utils.hpp"
3336
#include "utils/output_validation.hpp"
3437
#include "utils/sycl_alloc_utils.hpp"
3538
#include "utils/type_dispatch.hpp"
36-
#include <pybind11/pybind11.h>
3739

3840
#include "simplify_iteration_space.hpp"
3941

dpctl/tensor/libtensor/source/elementwise_functions/elementwise_functions.hpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@
2424
//===----------------------------------------------------------------------===//
2525
#pragma once
2626

27+
#include <stdexcept>
28+
#include <sycl/sycl.hpp>
29+
#include <utility>
30+
#include <vector>
31+
2732
#include "dpctl4pybind11.hpp"
2833
#include <pybind11/numpy.h>
2934
#include <pybind11/pybind11.h>
3035
#include <pybind11/stl.h>
31-
#include <sycl/sycl.hpp>
32-
#include <utility>
33-
#include <vector>
3436

3537
#include "elementwise_functions_type_utils.hpp"
3638
#include "kernels/alignment.hpp"

dpctl/tensor/libtensor/source/elementwise_functions/true_divide.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,18 @@
2323
/// specifically functions for elementwise operations.
2424
//===----------------------------------------------------------------------===//
2525

26-
#include "dpctl4pybind11.hpp"
2726
#include <complex>
2827
#include <cstdint>
29-
#include <pybind11/numpy.h>
30-
#include <pybind11/pybind11.h>
31-
#include <pybind11/stl.h>
28+
#include <stdexcept>
3229
#include <sycl/sycl.hpp>
3330
#include <utility>
3431
#include <vector>
3532

33+
#include "dpctl4pybind11.hpp"
34+
#include <pybind11/numpy.h>
35+
#include <pybind11/pybind11.h>
36+
#include <pybind11/stl.h>
37+
3638
#include "elementwise_functions.hpp"
3739
#include "simplify_iteration_space.hpp"
3840
#include "true_divide.hpp"

dpctl/tensor/libtensor/source/full_ctor.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,16 @@
2222
/// This file defines functions of dpctl.tensor._tensor_impl extensions
2323
//===--------------------------------------------------------------------===//
2424

25-
#include "dpctl4pybind11.hpp"
2625
#include <complex>
27-
#include <pybind11/complex.h>
28-
#include <pybind11/pybind11.h>
26+
#include <stdexcept>
2927
#include <sycl/sycl.hpp>
3028
#include <utility>
3129
#include <vector>
3230

31+
#include "dpctl4pybind11.hpp"
32+
#include <pybind11/complex.h>
33+
#include <pybind11/pybind11.h>
34+
3335
#include "kernels/constructors.hpp"
3436
#include "utils/output_validation.hpp"
3537
#include "utils/type_dispatch.hpp"

dpctl/tensor/libtensor/source/integer_advanced_indexing.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,15 @@
2626
#include <algorithm>
2727
#include <complex>
2828
#include <cstdint>
29-
#include <pybind11/complex.h>
30-
#include <pybind11/pybind11.h>
31-
#include <pybind11/stl.h>
29+
#include <stdexcept>
3230
#include <sycl/sycl.hpp>
3331
#include <utility>
3432

3533
#include "dpctl4pybind11.hpp"
34+
#include <pybind11/complex.h>
35+
#include <pybind11/pybind11.h>
36+
#include <pybind11/stl.h>
37+
3638
#include "kernels/integer_advanced_indexing.hpp"
3739
#include "utils/memory_overlap.hpp"
3840
#include "utils/offset_utils.hpp"

dpctl/tensor/libtensor/source/linalg_functions/dot.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@
2222
/// This file defines functions of dpctl.tensor._tensor_impl extensions
2323
//===--------------------------------------------------------------------===//
2424

25-
#include "dpctl4pybind11.hpp"
2625
#include <cstdint>
27-
#include <pybind11/numpy.h>
28-
#include <pybind11/pybind11.h>
29-
#include <pybind11/stl.h>
26+
#include <stdexcept>
3027
#include <sycl/sycl.hpp>
3128
#include <utility>
3229
#include <vector>
3330

31+
#include "dpctl4pybind11.hpp"
32+
#include <pybind11/numpy.h>
33+
#include <pybind11/pybind11.h>
34+
#include <pybind11/stl.h>
35+
3436
#include "dot.hpp"
3537
#include "dot_atomic_support.hpp"
3638
#include "dot_dispatch.hpp"

dpctl/tensor/libtensor/source/reductions/reduction_over_axis.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
#include <algorithm>
2929
#include <cstdint>
30+
#include <stdexcept>
3031
#include <sycl/sycl.hpp>
3132
#include <type_traits>
3233
#include <utility>

dpctl/tensor/libtensor/source/repeat.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,17 @@
2222
/// This file defines functions of dpctl.tensor._tensor_impl extensions
2323
//===--------------------------------------------------------------------===//
2424

25-
#include "dpctl4pybind11.hpp"
2625
#include <cstdint>
2726
#include <limits>
28-
#include <pybind11/pybind11.h>
29-
#include <pybind11/stl.h>
27+
#include <stdexcept>
3028
#include <sycl/sycl.hpp>
3129
#include <utility>
3230
#include <vector>
3331

32+
#include "dpctl4pybind11.hpp"
33+
#include <pybind11/pybind11.h>
34+
#include <pybind11/stl.h>
35+
3436
#include "kernels/repeat.hpp"
3537
#include "simplify_iteration_space.hpp"
3638
#include "utils/memory_overlap.hpp"

0 commit comments

Comments
 (0)