@@ -343,6 +343,15 @@ def _validate_args(self, args):
343343 f"({ args .num_iterations } <= { args .num_warmup_iterations } )"
344344 )
345345
346+ if (
347+ args .tf_profile_verbose and
348+ args .tf_profile_export_path is None
349+ ):
350+ raise ValueError (
351+ "`--tf_profile_verbose` can only be set if "
352+ "`--tf_profile_export_path=/path/to/export` is defined."
353+ )
354+
346355 if not args .use_tftrt :
347356 if args .use_dynamic_shape :
348357 raise ValueError (
@@ -360,12 +369,6 @@ def _validate_args(self, args):
360369 if args .use_xla :
361370 raise ValueError ("--use_xla flag is not supported with TF-TRT." )
362371
363- if args .precision not in self .ALLOWED_PRECISION_MODES :
364- raise ValueError (
365- f"The received --precision={ args .precision } is not "
366- f"supported. Allowed: { self .ALLOWED_PRECISION_MODES } "
367- )
368-
369372 if args .precision == "INT8" :
370373
371374 if not args .calib_data_dir :
@@ -379,21 +382,6 @@ def _validate_args(self, args):
379382 "doesn't exist or is not a directory"
380383 )
381384
382- if args .use_dynamic_shape :
383- raise ValueError (
384- "TF-TRT does not support dynamic shape mode with INT8 "
385- "calibration."
386- )
387-
388- if (
389- args .tf_profile_verbose and
390- args .tf_profile_export_path is None
391- ):
392- raise ValueError (
393- "`--tf_profile_verbose` can only be set if "
394- "`--tf_profile_export_path=/path/to/export` is defined."
395- )
396-
397385 def _post_process_args (self , args ):
398386 return args
399387
0 commit comments