File tree 3 files changed +13
-0
lines changed
3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 17
17
#pragma once
18
18
19
19
#include " oneapi/dal/detail/compute_ops.hpp"
20
+ #include " oneapi/dal/detail/user_policy.hpp"
20
21
#include " oneapi/dal/detail/spmd_policy.hpp"
21
22
#include " oneapi/dal/spmd/communicator.hpp"
22
23
@@ -28,6 +29,11 @@ auto compute(Args&&... args) {
28
29
return dal::detail::compute_dispatch (std::forward<Args>(args)...);
29
30
}
30
31
32
+ template <typename ... Args>
33
+ auto compute (detail::user_cpu_context uctx, Args&&... args) {
34
+ return dal::detail::compute_dispatch (uctx.get_host_policy (), std::forward<Args>(args)...);
35
+ }
36
+
31
37
#ifdef ONEDAL_DATA_PARALLEL
32
38
template <typename ... Args>
33
39
auto compute (sycl::queue& queue, Args&&... args) {
Original file line number Diff line number Diff line change @@ -103,6 +103,7 @@ class ONEDAL_EXPORT host_policy : public base {
103
103
}
104
104
host_policy (const host_policy&) = default ;
105
105
host_policy (host_policy&&) = default ;
106
+ host_policy& operator = (const host_policy&) = default ;
106
107
107
108
static host_policy get_default () {
108
109
return host_policy (make_default_impl ());
Original file line number Diff line number Diff line change 17
17
#pragma once
18
18
19
19
#include " oneapi/dal/detail/train_ops.hpp"
20
+ #include " oneapi/dal/detail/user_policy.hpp"
20
21
#include " oneapi/dal/detail/spmd_policy.hpp"
21
22
#include " oneapi/dal/spmd/communicator.hpp"
22
23
@@ -28,6 +29,11 @@ auto train(Args&&... args) {
28
29
return dal::detail::train_dispatch (std::forward<Args>(args)...);
29
30
}
30
31
32
+ template <typename ... Args>
33
+ auto train (detail::user_cpu_context uctx, Args&&... args) {
34
+ return dal::detail::train_dispatch (uctx.get_host_policy (), std::forward<Args>(args)...);
35
+ }
36
+
31
37
#ifdef ONEDAL_DATA_PARALLEL
32
38
template <typename ... Args>
33
39
auto train (sycl::queue& queue, Args&&... args) {
You can’t perform that action at this time.
0 commit comments