mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
fix graphs for older cuda
This commit is contained in:
@@ -54,8 +54,8 @@ void Device::make_current() {
|
|||||||
|
|
||||||
CommandEncoder::CaptureContext::CaptureContext(CommandEncoder& enc) : enc(enc) {
|
CommandEncoder::CaptureContext::CaptureContext(CommandEncoder& enc) : enc(enc) {
|
||||||
CHECK_CUDA_ERROR(cudaGraphCreate(&graph, 0));
|
CHECK_CUDA_ERROR(cudaGraphCreate(&graph, 0));
|
||||||
CHECK_CUDA_ERROR(cudaStreamBeginCaptureToGraph(
|
CHECK_CUDA_ERROR(
|
||||||
enc.stream(), graph, NULL, NULL, 0, cudaStreamCaptureModeGlobal));
|
cudaStreamBeginCapture(enc.stream(), cudaStreamCaptureModeGlobal));
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandEncoder::CaptureContext::~CaptureContext() {
|
CommandEncoder::CaptureContext::~CaptureContext() {
|
||||||
|
|||||||
Reference in New Issue
Block a user