File tree Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Expand file tree Collapse file tree 2 files changed +30
-3
lines changed Original file line number Diff line number Diff line change @@ -135,8 +135,8 @@ else()
135
135
endif ()
136
136
FetchContent_Declare (
137
137
ONEMATH
138
- GIT_REPOSITORY https://github.com/uxlfoundation /oneMath.git
139
- GIT_TAG c255b1b4c41e2ee3059455c1f96a965d6a62568a
138
+ GIT_REPOSITORY https://github.com/EwanC /oneMath.git
139
+ GIT_TAG 671d9bcc5aa6cc52cce6b6518c9b8f126c0352f4
140
140
)
141
141
FetchContent_MakeAvailable (ONEMATH )
142
142
# Create alias to match with find_package targets name
Original file line number Diff line number Diff line change @@ -3639,11 +3639,38 @@ static void ggml_backend_sycl_graph_compute_impl(ggml_backend_sycl_context * syc
3639
3639
}
3640
3640
}
3641
3641
3642
+ #ifdef GGML_SYCL_GRAPH
3643
+ static bool check_node_graph_compatibility (ggml_cgraph * cgraph) {
3644
+ for (int i = 0 ; i < cgraph->n_nodes ; i++) {
3645
+ ggml_tensor * node = cgraph->nodes [i];
3646
+ switch (node->op ) {
3647
+ default : break ;
3648
+ case GGML_OP_CONCAT:
3649
+ // ggml_sycl_op_concat() does a blocking host wait after memcpy operations,
3650
+ // but wait() can't be called on the events returned by a queue recording
3651
+ // to a graph.
3652
+ [[fallthrough]];
3653
+ case GGML_OP_MUL_MAT_ID:
3654
+ // ggml_sycl_op_concat() does a blocking host wait on the sycl queue after
3655
+ // submitting a memcpy operation, but wait() can't be called on a queue that
3656
+ // is recording to a graph.
3657
+ #ifndef NDEBUG
3658
+ GGML_LOG_DEBUG (" %s: disabling SYCL graphs due to unsupported node type\n " , __func__);
3659
+ #endif
3660
+ return false ;
3661
+ }
3662
+ }
3663
+ return true ;
3664
+
3665
+ }
3666
+ #endif
3667
+
3642
3668
static ggml_status ggml_backend_sycl_graph_compute (ggml_backend_t backend, ggml_cgraph * cgraph) {
3643
3669
auto * sycl_ctx = static_cast <ggml_backend_sycl_context *>(backend->context );
3644
3670
3645
3671
#ifdef GGML_SYCL_GRAPH
3646
- if (!g_ggml_sycl_disable_graph) {
3672
+ bool use_sycl_graph = !g_ggml_sycl_disable_graph && check_node_graph_compatibility (cgraph);
3673
+ if (use_sycl_graph) {
3647
3674
const bool graph_support = dpct::get_device (sycl_ctx->device ).has (sycl::aspect::ext_oneapi_limited_graph);
3648
3675
if (!graph_support) {
3649
3676
GGML_SYCL_DEBUG (" [SYCL-GRAPH] can not use graphs on device:%d\n " , sycl_ctx->device );
You can’t perform that action at this time.
0 commit comments