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

Method is_undefined

src/instruction.cpp:332–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332bool instruction::is_undefined() const
333{
334 if(op.name() == "undefined" or
335 (op.name() == "@literal" and this->get_literal().get_shape().elements() == 0))
336 {
337 return true;
338 }
339 else if(this->inputs().empty())
340 {
341 return false;
342 }
343 else
344 {
345 return std::all_of(this->inputs().begin(), this->inputs().end(), [](auto arg) {
346 return all_of(instruction::get_output_alias(arg),
347 [](auto alias) { return alias->is_undefined(); });
348 });
349 }
350}
351
352bool instruction::can_eval() const
353{

Callers 10

TEST_CASEFunction · 0.80
apply_vanilla_rnnMethod · 0.80
apply_gruMethod · 0.80
apply_lstmMethod · 0.80
skip_propagateFunction · 0.80
applyMethod · 0.80
insertMethod · 0.80
rnn_transpose_inputsFunction · 0.80
gru_transpose_inputsFunction · 0.80
lstm_transpose_inputsFunction · 0.80

Calls 8

all_ofFunction · 0.50
nameMethod · 0.45
elementsMethod · 0.45
get_shapeMethod · 0.45
emptyMethod · 0.45
inputsMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected