| commit | a84adaf0ff39a40ab4cd0867972b805c4733ca10 | [log] [tgz] |
|---|---|---|
| author | Eric Lunderberg <Lunderberg@users.noreply.github.com> | Thu Jun 27 16:07:22 2024 -0500 |
| committer | GitHub <noreply@github.com> | Thu Jun 27 14:07:22 2024 -0700 |
| tree | 428fc0d8677ec5de6a4c031be7e3051931500907 | |
| parent | 3c6ca5d92be2f147608df545073bbfd702d49be5 [diff] |
[CudaGraph] Handle exceptions thrown while capturing cuda graph (#17113) * [CudaGraph] Handle exceptions thrown while capturing cuda graph Prior to this commit, an exception thrown during the capture of a cuda graph would result in `std::terminate` being called. This commit updates the implementation of `"vm.builtin.cuda_graph.run_or_capture"` such that a thrown exception can be recovered from, and does not cause any changes to the state of TVM's cuda graph cache. - Call to `cudaStreamDestroy` was previously skipped, now moved to a RAII-style destructor in a `ScopedCUDAStream` class. - Call to `cudaStreamEndCapture` was previously skipped, end of cuda graph capture now performed as part of RAII-style destructor for `CUDACaptureStream` class. - Restoration of `CUDAThreadEntry::ThreadLocal()->stream` was previously skipped, now restored as part of RAII-style destructor for `CUDACaptureStream` class. - Previously, an error raised from `cudaGraphInstantiate` would leave the `capture_cache_` in an ill-formed state. Now, the `capture_cache_` is only updated after a valid `CUDAGraphCapturedState` has been fully constructed. * lint fix * Unit test fix
Documentation | Contributors | Community | Release Notes
Apache TVM is a compiler stack for deep learning systems. It is designed to close the gap between the productivity-focused deep learning frameworks, and the performance- and efficiency-focused hardware backends. TVM works with deep learning frameworks to provide end to end compilation to different backends.
TVM is licensed under the Apache-2.0 license.
Check out the TVM Documentation site for installation instructions, tutorials, examples, and more. The Getting Started with TVM tutorial is a great place to start.
TVM adopts apache committer model, we aim to create an open source project that is maintained and owned by the community. Check out the Contributor Guide.
We learned a lot from the following projects when building TVM.