Skip to content

Commit

Permalink
Unconditionally enable linear and matmul and turn off nv_enable_bookend.
Browse files Browse the repository at this point in the history
  • Loading branch information
wujingyue committed May 29, 2024
1 parent 0d97b80 commit 97c10ab
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions thunder/executors/nvfuserex_impl.py
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ def _can_fuse_node(n: Node):
enable_bookend: None | bool = get_compile_option("nv_enable_bookend", bookend_help)
# Set default value.
if enable_bookend is None:
enable_bookend = True
enable_bookend = False
assert isinstance(enable_bookend, bool)

if enable_bookend:
Expand Down Expand Up @@ -2205,9 +2205,6 @@ def _linear_check(a: TensorProxy, b: TensorProxy, bias: TensorProxy | None) -> b
if nv_version < LooseVersion("0.2.3"):
return False

enable_linear: None | bool = get_compile_option("nv_enable_linear", "Enable nvFuser linear.")
if not enable_linear:
return False
# Verify linear inputs and bias (optional) are supported tensors.
if not are_supported_tensors(a, b) or (bias is not None and not is_supported_tensor(bias)):
return False
Expand Down Expand Up @@ -2246,9 +2243,7 @@ def _matmul_check(
if nv_version < LooseVersion("0.2.2"):
return False

enable_matmul: None | bool = get_compile_option("nv_enable_matmul", "Enable nvFuser matmul.")

if not enable_matmul or not are_supported_tensors(a, b):
if not are_supported_tensors(a, b):
return False
if nv_version < LooseVersion("0.2.4"):
warnings.warn("nvFuser v0.2.2 has limited support for matmuls. Consider using v0.2.4 or above")
Expand Down

0 comments on commit 97c10ab

Please sign in to comment.