Skip to content

Commit 807d159

Browse files
committed
Formatter corrections
Signed-off-by: Gregory Shimansky <[email protected]>
1 parent d7c2c45 commit 807d159

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

python/setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,8 @@ def get_platform_dependent_src_path(subdir):
592592
)(*version.split('.'))))
593593
download_and_copy(
594594
name="cupti", src_path=get_platform_dependent_src_path("include"), dst_path="include",
595-
variable="TRITON_CUPTI_INCLUDE_PATH", version=NVIDIA_TOOLCHAIN_VERSION["cupti"], url_func=lambda system, arch, version:
595+
variable="TRITON_CUPTI_INCLUDE_PATH", version=NVIDIA_TOOLCHAIN_VERSION["cupti"],
596+
url_func=lambda system, arch, version:
596597
((lambda version_major, version_minor1, version_minor2:
597598
f"https://anaconda.org/nvidia/cuda-cupti-dev/{version}/download/{system}-{arch}/cuda-cupti-dev-{version}-0.tar.bz2"
598599
if int(version_major) >= 12 and int(version_minor1) >= 5 else

python/src/main.cc

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ namespace py = pybind11;
66

77
#define EXPAND(x) x
88
#define FOR_EACH_1(MACRO, X) MACRO(X)
9-
#define FOR_EACH_2(MACRO, X, ...) MACRO(X) EXPAND(FOR_EACH_1(MACRO, __VA_ARGS__))
10-
#define FOR_EACH_3(MACRO, X, ...) MACRO(X) EXPAND(FOR_EACH_2(MACRO, __VA_ARGS__))
11-
#define FOR_EACH_4(MACRO, X, ...) MACRO(X) EXPAND(FOR_EACH_3(MACRO, __VA_ARGS__))
9+
#define FOR_EACH_2(MACRO, X, ...) \
10+
MACRO(X) EXPAND(FOR_EACH_1(MACRO, __VA_ARGS__))
11+
#define FOR_EACH_3(MACRO, X, ...) \
12+
MACRO(X) EXPAND(FOR_EACH_2(MACRO, __VA_ARGS__))
13+
#define FOR_EACH_4(MACRO, X, ...) \
14+
MACRO(X) EXPAND(FOR_EACH_3(MACRO, __VA_ARGS__))
1215

1316
#define FOR_EACH_NARG(...) FOR_EACH_NARG_(__VA_ARGS__, FOR_EACH_RSEQ_N())
1417
#define FOR_EACH_NARG_(...) EXPAND(FOR_EACH_ARG_N(__VA_ARGS__))
@@ -19,7 +22,8 @@ namespace py = pybind11;
1922
#define CONCATENATE1(x, y) x##y
2023

2124
#define FOR_EACH(MACRO, ...) \
22-
EXPAND(CONCATENATE(FOR_EACH_, FOR_EACH_NARG_HELPER(__VA_ARGS__))(MACRO, __VA_ARGS__))
25+
EXPAND(CONCATENATE(FOR_EACH_, \
26+
FOR_EACH_NARG_HELPER(__VA_ARGS__))(MACRO, __VA_ARGS__))
2327
#define FOR_EACH_NARG_HELPER(...) FOR_EACH_NARG(__VA_ARGS__)
2428

2529
// New macro to remove parentheses

python/triton/runtime/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def _cc_cmd(cc, src, out, include_dirs, library_dirs, libraries):
3939
else:
4040
cc_cmd = [cc, src, "-O3", "-shared"]
4141
if os.name != "nt":
42-
cc_cmd += ["fPIC"]
42+
cc_cmd += ["fPIC"]
4343
cc_cmd += [f'-l{lib}' for lib in libraries]
4444
cc_cmd += [f"-L{dir}" for dir in library_dirs]
4545
cc_cmd += [f"-I{dir}" for dir in include_dirs]

0 commit comments

Comments
 (0)