summaryrefslogtreecommitdiff
path: root/candle-flash-attn/kernels/error.h
diff options
context:
space:
mode:
Diffstat (limited to 'candle-flash-attn/kernels/error.h')
-rw-r--r--candle-flash-attn/kernels/error.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/candle-flash-attn/kernels/error.h b/candle-flash-attn/kernels/error.h
new file mode 100644
index 00000000..03416924
--- /dev/null
+++ b/candle-flash-attn/kernels/error.h
@@ -0,0 +1,8 @@
+#pragma once
+
+#define C10_CUDA_CHECK(EXPR) \
+ do { \
+ const cudaError_t __err = EXPR; \
+ } while (0)
+
+#define C10_CUDA_KERNEL_LAUNCH_CHECK() C10_CUDA_CHECK(cudaGetLastError())