• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IntelPython / dpnp / 24347838098

13 Apr 2026 02:06PM UTC coverage: 77.879%. First build
24347838098

Pull #2843

github

web-flow
Merge 23da515f9 into 761573ccf
Pull Request #2843: Merge master into include-dpctl-tensor

1578 of 2920 branches covered (54.04%)

Branch coverage included in aggregate %.

332 of 399 new or added lines in 64 files covered. (83.21%)

26386 of 32987 relevant lines covered (79.99%)

7861.1 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

6.06
/dpnp/backend/src/queue_sycl.cpp
1
//*****************************************************************************
2
// Copyright (c) 2016, Intel Corporation
3
// All rights reserved.
4
//
5
// Redistribution and use in source and binary forms, with or without
6
// modification, are permitted provided that the following conditions are met:
7
// - Redistributions of source code must retain the above copyright notice,
8
//   this list of conditions and the following disclaimer.
9
// - Redistributions in binary form must reproduce the above copyright notice,
10
//   this list of conditions and the following disclaimer in the documentation
11
//   and/or other materials provided with the distribution.
12
// - Neither the name of the copyright holder nor the names of its contributors
13
//   may be used to endorse or promote products derived from this software
14
//   without specific prior written permission.
15
//
16
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
26
// THE POSSIBILITY OF SUCH DAMAGE.
27
//*****************************************************************************
28

29
#include <chrono>
30
#include <iostream>
31

32
#include "dpnp_iface.hpp"
33
#include "dpnp_utils.hpp"
34
#include "queue_sycl.hpp"
35

36
[[maybe_unused]] static void dpnpc_show_mathlib_version()
37
{
×
38
#if 1
×
39
    const int len = 256;
×
40
    std::string mathlib_version_str(len, 0x0);
×
41

×
42
    char *buf = const_cast<char *>(
×
43
        mathlib_version_str.c_str()); // TODO avoid write into the container
×
44

×
45
    mkl_get_version_string(buf, len);
×
46

×
47
    std::cout << "Math backend version: " << mathlib_version_str << std::endl;
×
48
#else
×
49
    // Failed to load library under Python environment die to unresolved symbol
×
50
    MKLVersion version;
×
51

×
52
    mkl_get_version(&version);
×
53

×
54
    std::cout << "Math backend version: " << version.MajorVersion << "."
×
55
              << version.UpdateVersion << "." << version.MinorVersion
×
56
              << std::endl;
×
57
#endif
×
58
}
×
59

60
#if (not defined(NDEBUG))
61
[[maybe_unused]] static std::string
62
    device_type_to_str(sycl::info::device_type devTy)
63
{
×
64
    std::stringstream ss;
×
65
    switch (devTy) {
×
66
    case sycl::info::device_type::cpu:
×
67
        ss << "cpu";
×
68
        break;
×
69
    case sycl::info::device_type::gpu:
×
70
        ss << "gpu";
×
71
        break;
×
72
    case sycl::info::device_type::accelerator:
×
73
        ss << "accelerator";
×
74
        break;
×
75
    case sycl::info::device_type::custom:
×
76
        ss << "custom";
×
77
        break;
×
78
    default:
×
79
        ss << "unknown";
×
80
    }
×
81
    return ss.str();
×
82
}
×
83

84
[[maybe_unused]] static void show_available_sycl_devices()
85
{
×
86
    const std::vector<sycl::device> devices = sycl::device::get_devices();
×
87

×
88
    std::cout << "Available SYCL devices:" << std::endl;
×
89
    for (std::vector<sycl::device>::const_iterator it = devices.cbegin();
×
NEW
90
         it != devices.cend(); ++it) {
×
91
        std::cout
×
92
            // not yet implemented error << " " <<
×
93
            // it->has(sycl::aspect::usm_shared_allocations)  << " "
×
94
            << " - id=" << it->get_info<sycl::info::device::vendor_id>()
×
95
            << ", type="
×
96
            << device_type_to_str(
×
97
                   it->get_info<sycl::info::device::device_type>())
×
98
            << ", gws="
×
99
            << it->get_info<sycl::info::device::max_work_group_size>()
×
100
            << ", cu=" << it->get_info<sycl::info::device::max_compute_units>()
×
101
            << ", name=" << it->get_info<sycl::info::device::name>()
×
102
            << std::endl;
×
103
    }
×
104
}
×
105
#endif
106

107
size_t dpnp_queue_is_cpu_c()
108
{
6✔
109
    const auto &be = backend_sycl::get();
6✔
110
    return be.backend_sycl_is_cpu();
6✔
111
}
6✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc