(program, feed, fetch_list)
| 658 | |
| 659 | |
| 660 | def _get_strong_program_cache_key(program, feed, fetch_list): |
| 661 | # TODO(zhiqiu): use hash_str to generate cache key as above |
| 662 | def _get_varname_from_block(block): |
| 663 | block_str = [] |
| 664 | for var_name in list(block.vars.keys()): |
| 665 | block_str.append(var_name) |
| 666 | return "\n".join(block_str) |
| 667 | |
| 668 | inner_program = ( |
| 669 | program._program |
| 670 | if isinstance(program, compiler.CompiledProgram) |
| 671 | else program |
| 672 | ) |
| 673 | return ( |
| 674 | _get_varname_from_block(inner_program.blocks[0]) |
| 675 | + str(id(program)) |
| 676 | + _get_program_cache_key(feed, fetch_list) |
| 677 | ) |
| 678 | |
| 679 | |
| 680 | def _get_feed_fetch_var_names(feed, fetch_list): |
no test coverage detected