@@ -268,12 +268,12 @@ def cross_compile_for_windows(
268268 "When enable_weight_streaming is enabled, it requires use_explicit_typing to be set to True"
269269 )
270270 # Aliasing inputs to arg_inputs for better understanding
271- if not arg_inputs and not kwarg_inputs and not inputs :
271+ if arg_inputs is None and kwarg_inputs is None and inputs is None :
272272 raise AssertionError (
273273 "'arg_inputs', 'kwarg_inputs' and 'inputs' should not all be None."
274274 )
275275
276- elif arg_inputs and inputs :
276+ elif arg_inputs is not None and inputs is not None :
277277 raise AssertionError (
278278 "'arg_inputs' and 'inputs' should not be used at the same time."
279279 )
@@ -604,12 +604,12 @@ def compile(
604604 "When enable_weight_streaming is enabled, it requires use_explicit_typing to be set to True"
605605 )
606606 # Aliasing inputs to arg_inputs for better understanding
607- if not arg_inputs and not kwarg_inputs and not inputs :
607+ if arg_inputs is None and kwarg_inputs is None and inputs is None :
608608 raise AssertionError (
609609 "'arg_inputs', 'kwarg_inputs' and 'inputs' should not all be None."
610610 )
611611
612- elif arg_inputs and inputs :
612+ elif arg_inputs is not None and inputs is not None :
613613 raise AssertionError (
614614 "'arg_inputs' and 'inputs' should not be used at the same time."
615615 )
@@ -1223,12 +1223,12 @@ def convert_exported_program_to_serialized_trt_engine(
12231223 "When enable_weight_streaming is enabled, it requires use_explicit_typing to be set to True"
12241224 )
12251225 # Aliasing inputs to arg_inputs for better understanding
1226- if not arg_inputs and not kwarg_inputs and not inputs :
1226+ if arg_inputs is None and kwarg_inputs is None and inputs is None :
12271227 raise AssertionError (
12281228 "'arg_inputs', 'kwarg_inputs' and 'inputs' should not all be None."
12291229 )
12301230
1231- elif arg_inputs and inputs :
1231+ elif arg_inputs is not None and inputs is not None :
12321232 raise AssertionError (
12331233 "'arg_inputs' and 'inputs' should not be used at the same time."
12341234 )
0 commit comments