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

IntelPython / dpnp / 20997425682

14 Jan 2026 02:20PM UTC coverage: 81.127% (-0.2%) from 81.336%
20997425682

Pull #2716

github

web-flow
Merge e2b96b7bf into dd9976d03
Pull Request #2716: Remove use of `python setup.py develop/install`

1330 of 2452 branches covered (54.24%)

Branch coverage included in aggregate %.

19785 of 23575 relevant lines covered (83.92%)

26791.77 hits per line

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

5.97
/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();
×
90
         it != devices.cend(); ++it)
×
91
    {
×
92
        std::cout
×
93
            // not yet implemented error << " " <<
×
94
            // it->has(sycl::aspect::usm_shared_allocations)  << " "
×
95
            << " - id=" << it->get_info<sycl::info::device::vendor_id>()
×
96
            << ", type="
×
97
            << device_type_to_str(
×
98
                   it->get_info<sycl::info::device::device_type>())
×
99
            << ", gws="
×
100
            << it->get_info<sycl::info::device::max_work_group_size>()
×
101
            << ", cu=" << it->get_info<sycl::info::device::max_compute_units>()
×
102
            << ", name=" << it->get_info<sycl::info::device::name>()
×
103
            << std::endl;
×
104
    }
×
105
}
×
106
#endif
107

108
size_t dpnp_queue_is_cpu_c()
109
{
6✔
110
    const auto &be = backend_sycl::get();
6✔
111
    return be.backend_sycl_is_cpu();
6✔
112
}
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