[Triton-MLIR][Testing]Fix tests warning, with small code clean-up (#894)

1.Code clean-up to remove superfluous #includes.
2.Fix two python test warnings, in which one relates to ["#"
formats](https://jira.mongodb.org/browse/PYTHON-2343), the other relates
to regular expression string usage.
This commit is contained in:
Jun Yang
2022-11-19 22:33:59 +08:00
committed by GitHub
parent afaf59b0c9
commit 8a5647782d
5 changed files with 3 additions and 33 deletions

View File

@@ -1319,7 +1319,7 @@ def make_stub(name, signature, constants):
def convert_type_repr(x):
match = re.search('!tt\.ptr<(.*)>', x)
match = re.search(r'!tt\.ptr<(.*)>', x)
if match is not None:
return '*' + convert_type_repr(match.group(1))
return x
@@ -1490,6 +1490,7 @@ class CudaUtils(object):
#include <cuda.h>
#include \"cuda.h\"
#define PY_SSIZE_T_CLEAN
#include <Python.h>
static inline void gpuAssert(CUresult code, const char *file, int line)