| 1772 | } |
| 1773 | |
| 1774 | Status MarkForCompilationPass::RunForTest( |
| 1775 | const GraphOptimizationPassOptions& options, |
| 1776 | bool disable_deadness_analysis) { |
| 1777 | MarkForCompilationPassFlags* flags = GetMarkForCompilationPassFlags(); |
| 1778 | |
| 1779 | MarkForCompilationPassImpl::DebugOptions debug_options; |
| 1780 | debug_options.ignore_deadness_checks = disable_deadness_analysis; |
| 1781 | debug_options.ignore_resource_variable_checks = |
| 1782 | flags->tf_xla_disable_resource_variable_safety_checks_for_debugging; |
| 1783 | debug_options.ignore_xla_compile_attr = true; |
| 1784 | debug_options.max_cluster_size = flags->tf_xla_max_cluster_size; |
| 1785 | debug_options.min_cluster_size = flags->tf_xla_min_cluster_size; |
| 1786 | debug_options.fuel = GetPointerToFuel(flags->tf_xla_clustering_fuel); |
| 1787 | debug_options.dump_graphs = flags->tf_xla_clustering_debug; |
| 1788 | |
| 1789 | return MarkForCompilation(options, debug_options); |
| 1790 | } |
| 1791 | |
| 1792 | absl::flat_hash_map<string, std::vector<string>>* GetWhitelistTable() { |
| 1793 | // Table format: category name: {list of TF operations in that category} |