Skip to content

Commit

Permalink
annote triton constexpr #56
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianlim committed Jul 31, 2024
1 parent 80edec8 commit 1ef30a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ def _cross_entropy_backward(
pass


MAX_FUSED_SIZE = 65536 # 2**16
MAX_FUSED_SIZE: tl.constexpr = 65536 # 2**16

class Fast_CrossEntropyLoss(torch.autograd.Function):
@staticmethod
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import torch
from .utils import calculate_settings

ROPE_GROUP_SIZE = 4
ROPE_GROUP_SIZE: tl.constexpr = 4

@triton.heuristics({"BACKWARD_PASS": lambda args: args["BACKWARD_PASS"],})
@triton.jit
Expand Down

0 comments on commit 1ef30a9

Please sign in to comment.