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

IntelPython / dpctl / 28596131537

02 Jul 2026 02:03PM UTC coverage: 75.411% (-0.3%) from 75.677%
28596131537

Pull #2331

github

web-flow
Merge 89ec05ee8 into 7e85c9dfb
Pull Request #2331: Add Python bindings for SYCL IPC memory via dpctl

834 of 1158 branches covered (72.02%)

Branch coverage included in aggregate %.

0 of 19 new or added lines in 2 files covered. (0.0%)

1 existing line in 1 file now uncovered.

3245 of 4251 relevant lines covered (76.33%)

272.55 hits per line

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

80.49
/libsyclinterface/source/dpctl_sycl_extension_interface.cpp
1
//===---- dpctl_sycl_extension_interface.cpp - Implements C API for SYCL ext =//
2
//
3
//                      Data Parallel Control (dpctl)
4
//
5
// Copyright 2024 Intel Corporation
6
//
7
// Licensed under the Apache License, Version 2.0 (the "License");
8
// you may not use this file except in compliance with the License.
9
// You may obtain a copy of the License at
10
//
11
//    http://www.apache.org/licenses/LICENSE-2.0
12
//
13
// Unless required by applicable law or agreed to in writing, software
14
// distributed under the License is distributed on an "AS IS" BASIS,
15
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
// See the License for the specific language governing permissions and
17
// limitations under the License.
18
//
19
//===----------------------------------------------------------------------===//
20
///
21
/// \file
22
/// This file implements the data types and functions declared in
23
/// dpctl_sycl_extension_interface.h.
24
///
25
//===----------------------------------------------------------------------===//
26

27
#include "dpctl_sycl_extension_interface.h"
28

29
#include "dpctl_error_handlers.h"
30
#include "dpctl_sycl_type_casters.hpp"
31

32
#include <sycl/sycl.hpp>
33

34
using namespace dpctl::syclinterface;
35

36
DPCTL_API
37
__dpctl_give DPCTLSyclWorkGroupMemoryRef
38
DPCTLWorkGroupMemory_Create(size_t nbytes)
39
{
11✔
40
    DPCTLSyclWorkGroupMemoryRef wgm = nullptr;
11✔
41
    try {
11✔
42
        auto WorkGroupMem = new RawWorkGroupMemory{nbytes};
11✔
43
        wgm = wrap<RawWorkGroupMemory>(WorkGroupMem);
11✔
44
    } catch (std::exception const &e) {
11✔
45
        error_handler(e, __FILE__, __func__, __LINE__);
×
46
    }
×
47
    return wgm;
11✔
48
}
11✔
49

50
DPCTL_API
51
void DPCTLWorkGroupMemory_Delete(__dpctl_take DPCTLSyclWorkGroupMemoryRef Ref)
52
{
11✔
53
    delete unwrap<RawWorkGroupMemory>(Ref);
11✔
54
}
11✔
55

56
DPCTL_API
57
bool DPCTLWorkGroupMemory_Available()
58
{
13✔
59
#ifdef SYCL_EXT_ONEAPI_WORK_GROUP_MEMORY
13✔
60
    return true;
13✔
61
#else
62
    return false;
63
#endif
64
}
13✔
65

66
DPCTL_API
67
bool DPCTLIPCMem_Available()
NEW
68
{
×
69
#ifdef SYCL_EXT_ONEAPI_INTER_PROCESS_COMMUNICATION
70
    return true;
71
#else
NEW
72
    return false;
×
NEW
73
#endif
×
NEW
74
}
×
75

76
using raw_kernel_arg_t = std::vector<unsigned char>;
77

78
DPCTL_API
79
__dpctl_give DPCTLSyclRawKernelArgRef DPCTLRawKernelArg_Create(void *bytes,
80
                                                               size_t count)
81
{
12✔
82
    DPCTLSyclRawKernelArgRef rka = nullptr;
12✔
83
    try {
12✔
84
        auto RawKernelArg =
12✔
85
            std::unique_ptr<raw_kernel_arg_t>(new raw_kernel_arg_t(count));
12✔
86
        std::memcpy(RawKernelArg->data(), bytes, count);
12✔
87
        rka = wrap<raw_kernel_arg_t>(RawKernelArg.get());
12✔
88
        RawKernelArg.release();
12✔
89
    } catch (std::exception const &e) {
12✔
90
        error_handler(e, __FILE__, __func__, __LINE__);
×
91
    }
×
92
    return rka;
12✔
93
}
12✔
94

95
DPCTL_API
96
void DPCTLRawKernelArg_Delete(__dpctl_take DPCTLSyclRawKernelArgRef Ref)
97
{
12✔
98
    delete unwrap<raw_kernel_arg_t>(Ref);
12✔
99
}
12✔
100

101
DPCTL_API
102
bool DPCTLRawKernelArg_Available()
103
{
14✔
104
#ifdef SYCL_EXT_ONEAPI_RAW_KERNEL_ARG
14✔
105
    return true;
14✔
106
#else
107
    return false;
108
#endif
109
}
14✔
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