Skip to content

Commit 1617395

Browse files
committed
Move InvalidType and Identity to the beginning of the enum
Signed-off-by: Neta Zmora <96238833+nzmora-nvidia@users.noreply.github.com>
1 parent e50051c commit 1617395

File tree

2 files changed

+18
-18
lines changed
  • cpp/tensorrt_llm/kernels/cutlass_kernels/include
  • tensorrt_llm/_torch

2 files changed

+18
-18
lines changed

cpp/tensorrt_llm/kernels/cutlass_kernels/include/common.h

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@ namespace tensorrt_llm::kernels::cutlass_kernels
2323
// cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu::doActivationKernel().
2424
enum class ActivationType
2525
{
26-
Gelu = 0,
27-
Relu,
28-
Silu,
29-
Swiglu,
30-
Geglu,
31-
SwigluBias,
32-
Relu2,
33-
Identity,
34-
InvalidType
26+
InvalidType = 0,
27+
Identity = 1,
28+
Gelu = 2,
29+
Relu = 3,
30+
Silu = 4,
31+
Swiglu = 5,
32+
Geglu = 6,
33+
SwigluBias = 7,
34+
Relu2 = 8,
3535
};
3636

3737
} // namespace tensorrt_llm::kernels::cutlass_kernels

tensorrt_llm/_torch/utils.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
# IMPORTANT: Keep the same order of activation functions in this enum and the enum in
3535
# cpp/tensorrt_llm/kernels/cutlass_kernels/include/common.h
3636
class ActivationType(IntEnum):
37-
Gelu = 0
38-
Relu = 1
39-
Silu = 2
40-
Swiglu = 3
41-
Geglu = 4
42-
SwigluBias = 5
43-
Relu2 = 6
44-
Identity = 7
45-
InvalidType = 8
37+
InvalidType = 0
38+
Identity = 1
39+
Gelu = 2
40+
Relu = 3
41+
Silu = 4
42+
Swiglu = 5
43+
Geglu = 6
44+
SwigluBias = 7
45+
Relu2 = 8
4646

4747

4848
def set_torch_compiling(enable: bool):

0 commit comments

Comments
 (0)