File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -2645,6 +2645,8 @@ static void update_cuda_graph_executable(ggml_backend_cuda_context * cuda_ctx) {
2645
2645
2646
2646
static void evaluate_and_capture_cuda_graph (ggml_backend_cuda_context * cuda_ctx, ggml_cgraph * cgraph,
2647
2647
bool & graph_evaluated_or_captured, bool & use_cuda_graph, bool & cuda_graph_update_required) {
2648
+ // flag used to determine whether it is an integrated_gpu
2649
+ const bool integrated = ggml_cuda_info ().devices [cuda_ctx->device ].integrated ;
2648
2650
2649
2651
while (!graph_evaluated_or_captured) {
2650
2652
// Only perform the graph execution if CUDA graphs are not enabled, or we are capturing the graph.
@@ -2663,7 +2665,7 @@ static void evaluate_and_capture_cuda_graph(ggml_backend_cuda_context * cuda_ctx
2663
2665
if (node->src [j] != nullptr ) {
2664
2666
assert (node->src [j]->buffer );
2665
2667
assert (node->src [j]->buffer ->buft == ggml_backend_cuda_buffer_type (cuda_ctx->device ) ||
2666
- ggml_backend_buft_is_cuda_split (node->src [j]->buffer ->buft ));
2668
+ ggml_backend_buft_is_cuda_split (node->src [j]->buffer ->buft ) || (integrated && ggml_backend_buft_is_cuda_host (node-> src [j]-> buffer -> buft )) );
2667
2669
}
2668
2670
}
2669
2671
#endif
You can’t perform that action at this time.
0 commit comments