[DRYRUN] Fix dryrun in partial build (#10761)

When partial build is called for dryrun, do constant propagate too.
In normal case, partial build is not doing constant propate for saving build time of internal program.
However, if partial build is called with dryrun, it will fail at transfer_constants due to the generic nodes which does not have impl.
This commit is contained in:
Taylor Yeonbok Lee 2022-03-07 13:37:21 +09:00 committed by GitHub
parent de47a3b4a4
commit 3e7e0d5651
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -560,7 +560,12 @@ void program::post_optimize_graph(bool is_internal) {
apply_opt_pass<remove_redundant_reorders>(lo, false, true); // TODO: do we need it at this place also?
#ifdef GPU_DEBUG_CONFIG
GPU_DEBUG_GET_INSTANCE(debug_config);
if (!is_internal && (!options.get<build_option_type::partial_build_program>()->enabled() || !debug_config->dry_run_path.empty())) {
#else
if (!is_internal && !options.get<build_option_type::partial_build_program>()->enabled()) {
#endif
// ToDo remove hidden dependencies from propagate_constants pass
apply_opt_pass<propagate_constants>();
}