@@ -116,7 +116,8 @@ def fail_if(p, msg):
116
116
117
117
118
118
def target_platform ():
119
- if FLAGS .target_platform is not None :
119
+ # When called by compose.py, FLAGS will be None
120
+ if FLAGS and FLAGS .target_platform is not None :
120
121
return FLAGS .target_platform
121
122
platform_string = platform .system ().lower ()
122
123
if platform_string == "linux" :
@@ -132,7 +133,8 @@ def target_platform():
132
133
133
134
134
135
def target_machine ():
135
- if FLAGS .target_machine is not None :
136
+ # When called by compose.py, FLAGS will be None
137
+ if FLAGS and FLAGS .target_machine is not None :
136
138
return FLAGS .target_machine
137
139
return platform .machine ().lower ()
138
140
@@ -639,13 +641,16 @@ def pytorch_cmake_args(images):
639
641
cmake_backend_arg ("pytorch" , "TRITON_PYTORCH_DOCKER_IMAGE" , None , image ),
640
642
]
641
643
642
- if FLAGS .enable_gpu :
644
+ # TODO: TPRD-372 TorchTRT extension is not currently supported by our manylinux build
645
+ # TODO: TPRD-373 NVTX extension is not currently supported by our manylinux build
646
+ if target_platform () != "rhel" :
647
+ if FLAGS .enable_gpu :
648
+ cargs .append (
649
+ cmake_backend_enable ("pytorch" , "TRITON_PYTORCH_ENABLE_TORCHTRT" , True )
650
+ )
643
651
cargs .append (
644
- cmake_backend_enable ("pytorch" , "TRITON_PYTORCH_ENABLE_TORCHTRT " , True )
652
+ cmake_backend_enable ("pytorch" , "TRITON_ENABLE_NVTX " , FLAGS . enable_nvtx )
645
653
)
646
- cargs .append (
647
- cmake_backend_enable ("pytorch" , "TRITON_ENABLE_NVTX" , FLAGS .enable_nvtx )
648
- )
649
654
return cargs
650
655
651
656
@@ -1301,7 +1306,6 @@ def dockerfile_prepare_container_linux(argmap, backends, enable_gpu, target_mach
1301
1306
gpu_enabled = gpu_enabled
1302
1307
)
1303
1308
1304
- # This
1305
1309
if target_platform () == "rhel" :
1306
1310
df += """
1307
1311
# Common dpeendencies.
0 commit comments