Skip to content

Commit f062089

Browse files
authored
[NFC] Remove dead code for python<3.8 (#5280)
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 58f8a24 commit f062089

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

python/triton/compiler/code_generator.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import ast
22
import inspect
33
import re
4-
import sys
54
import warnings
65
import os
76
import textwrap
@@ -1176,17 +1175,6 @@ def visit_BoolOp(self, node: ast.BoolOp):
11761175

11771176
_method_name_for_bool_op: Dict[Type[ast.boolop], str] = {ast.And: 'logical_and', ast.Or: 'logical_or'}
11781177

1179-
if sys.version_info < (3, 8):
1180-
1181-
def visit_NameConstant(self, node):
1182-
return constexpr(node.value)
1183-
1184-
def visit_Num(self, node):
1185-
return constexpr(node.n)
1186-
1187-
def visit_Str(self, node):
1188-
return constexpr(ast.literal_eval(node))
1189-
11901178
def visit_Attribute(self, node):
11911179
lhs = self.visit(node.value)
11921180
if _is_triton_tensor(lhs) and node.attr == "T":

0 commit comments

Comments
 (0)