| 327 | } |
| 328 | |
| 329 | instruction_ref module::replace_instruction(instruction_ref ins, |
| 330 | const operation& op, |
| 331 | std::vector<instruction_ref> args) MIGRAPHX_TIDY_CONST |
| 332 | { |
| 333 | impl->changed.notify(); |
| 334 | assert(has_instruction(ins)); |
| 335 | assert(not starts_with(op.name(), "@")); |
| 336 | |
| 337 | shape r = compute_shape(op, args); |
| 338 | instruction::replace(ins, op, r, std::move(args)); |
| 339 | assert(ins->valid(begin())); |
| 340 | return ins; |
| 341 | } |
| 342 | |
| 343 | instruction_ref module::replace_instruction(instruction_ref ins, |
| 344 | const operation& op, |