Skip to content

Commit 4f8ebfd

Browse files
authored
set emulate_precision_casts as true for cuda backend for better accuracy (#14983)
Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * __->__ #14983 as title Differential Revision: [D84288174](https://our.internmc.facebook.com/intern/diff/D84288174/)
1 parent 4bdd3df commit 4f8ebfd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

backends/cuda/cuda_backend.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ def preprocess(
129129
user_input_placeholders.append(node.meta["val"])
130130

131131
options: dict[str, typing.Any] = {
132+
# Better model precision
133+
"emulate_precision_casts": True,
132134
# Embed CUDA kernel binaries directly into the compiled shared object
133135
"aot_inductor.embed_kernel_binary": True,
134136
# Do not link against the full PyTorch/libtorch library

0 commit comments

Comments
 (0)