MCPcopy Create free account
hub / github.com/ROCm/AMDMIGraphX / is_dead

Function is_dead

src/fuse_pointwise.cpp:70–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68static shape to_scalar(const shape& s) { return shape{s.type()}; }
69
70static bool is_dead(instruction_ref ins)
71{
72 if(ins->name() == "@return")
73 return false;
74 if(ins->outputs().empty())
75 return true;
76 if(ins->name() != "pointwise")
77 return false;
78 return ends_with(ins->module_inputs().front()->name(), "-deleted");
79}
80
81// We dont want to consider the `extra` instruction as dead as it might be an implicit return
82static bool is_used_once(instruction_ref ins, instruction_ref* extra = nullptr)

Callers 3

is_used_onceFunction · 0.85
find_output_pointwiseFunction · 0.85
find_pointwise_modulesFunction · 0.85

Calls 5

ends_withFunction · 0.85
outputsMethod · 0.80
frontMethod · 0.80
nameMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected