Package org.apache.sysds.runtime.instructions.cp

## Class DnnCPInstruction

- java.lang.Object
- - org.apache.sysds.runtime.instructions.Instruction
  - - org.apache.sysds.runtime.instructions.cp.CPInstruction
    - - org.apache.sysds.runtime.instructions.cp.ComputationCPInstruction
      - - org.apache.sysds.runtime.instructions.cp.UnaryCPInstruction
        - - org.apache.sysds.runtime.instructions.cp.DnnCPInstruction

All Implemented Interfaces:
  `LineageTraceable`

    public class DnnCPInstruction
    extends UnaryCPInstruction

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.sysds.runtime.instructions.cp.CPInstruction

`CPInstruction.CPType`

### Nested classes/interfaces inherited from class org.apache.sysds.runtime.instructions.Instruction

`Instruction.IType`

### Field Summary

### Fields inherited from class org.apache.sysds.runtime.instructions.cp.ComputationCPInstruction

`input1, input2, input3, input4, output`

### Fields inherited from class org.apache.sysds.runtime.instructions.Instruction

`DATATYPE_PREFIX, FEDERATED_INST_PREFIX, GPU_INST_PREFIX, INSTRUCTION_DELIM, LITERAL_PREFIX, OPERAND_DELIM, SP_INST_PREFIX, VALUETYPE_PREFIX`

### Constructor Summary

Constructors
`DnnCPInstruction​(CPOperand in, CPOperand in2, CPOperand out, String opcode, String istr, int numThreads, double intermediateMemoryBudget)`
`DnnCPInstruction​(CPOperand in, CPOperand in2, CPOperand out, String opcode, String istr, ArrayList<CPOperand> stride, ArrayList<CPOperand> padding, ArrayList<CPOperand> input_shape, ArrayList<CPOperand> filter_shape, int numThreads, double intermediateMemoryBudget)`
`DnnCPInstruction​(CPOperand in, CPOperand in2, CPOperand in3, CPOperand out, String opcode, String istr, ArrayList<CPOperand> stride, ArrayList<CPOperand> padding, ArrayList<CPOperand> input_shape, ArrayList<CPOperand> filter_shape, int numThreads, double intermediateMemoryBudget)`
`DnnCPInstruction​(CPOperand in, CPOperand in2, CPOperand in3, CPOperand out, ArrayList<CPOperand> stride, ArrayList<CPOperand> padding, ArrayList<CPOperand> input_shape, ArrayList<CPOperand> filter_shape, int numThreads, double intermediateMemoryBudget, String opcode, String istr)`
`DnnCPInstruction​(CPOperand in1, CPOperand in2, CPOperand in3, CPOperand in4, CPOperand in5, CPOperand in6, CPOperand in7, CPOperand in8, CPOperand out1, CPOperand out2, CPOperand out3, CPOperand out4, CPOperand out5, String opcode, String str, int i)`
`DnnCPInstruction​(CPOperand in1, CPOperand in2, CPOperand in3, CPOperand in4, CPOperand in5, CPOperand in6, CPOperand in7, CPOperand in8, CPOperand in9, CPOperand in10, CPOperand in11, CPOperand out, CPOperand out2, CPOperand out3, CPOperand out4, CPOperand out5, String opcode, String istr, double intermediateMemoryBudget)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`org.apache.commons.lang3.tuple.Pair<String,​LineageItem>` `getLineageItem​(ExecutionContext ec)` Obtain lineage trace of an instruction with a single output.
`static DnnCPInstruction` `parseInstruction​(String str)`
`void` `processBatchNorm2dBackwardInstruction​(ExecutionContext ec)`
`void` `processBatchNorm2dInstruction​(ExecutionContext ec)`
`void` `processBiasAddInstruction​(ExecutionContext ec)`
`void` `processBiasMultiplyInstruction​(ExecutionContext ec)`
`void` `processInstruction​(ExecutionContext ec)` This method should be used to execute the instruction.
`void` `processReluBackwardInstruction​(ExecutionContext ec)`

### Methods inherited from class org.apache.sysds.runtime.instructions.cp.ComputationCPInstruction

`getInputs, getOutput, getOutputVariableName, hasFrameInput`

### Methods inherited from class org.apache.sysds.runtime.instructions.cp.CPInstruction

`getCPInstructionType, getGraphString, getType, postprocessInstruction, preprocessInstruction, requiresLabelUpdate, updateLabels`

### Methods inherited from class org.apache.sysds.runtime.instructions.Instruction

`getBeginColumn, getBeginLine, getEndColumn, getEndLine, getExtendedOpcode, getFilename, getInstID, getInstructionString, getLineNum, getOpcode, getOperator, printMe, setInstID, setLocation, setLocation, setLocation, setLocation, toString, updateInstructionThreadID`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.apache.sysds.runtime.lineage.LineageTraceable

`getLineageItems, hasSingleLineage`

### Constructor Detail

#### DnnCPInstruction

    public DnnCPInstruction​(CPOperand in,
                            CPOperand in2,
                            CPOperand in3,
                            CPOperand out,
                            ArrayList<CPOperand> stride,
                            ArrayList<CPOperand> padding,
                            ArrayList<CPOperand> input_shape,
                            ArrayList<CPOperand> filter_shape,
                            int numThreads,
                            double intermediateMemoryBudget,
                            String opcode,
                            String istr)

#### DnnCPInstruction

    public DnnCPInstruction​(CPOperand in,
                            CPOperand in2,
                            CPOperand out,
                            String opcode,
                            String istr,
                            int numThreads,
                            double intermediateMemoryBudget)

#### DnnCPInstruction

    public DnnCPInstruction​(CPOperand in,
                            CPOperand in2,
                            CPOperand out,
                            String opcode,
                            String istr,
                            ArrayList<CPOperand> stride,
                            ArrayList<CPOperand> padding,
                            ArrayList<CPOperand> input_shape,
                            ArrayList<CPOperand> filter_shape,
                            int numThreads,
                            double intermediateMemoryBudget)

#### DnnCPInstruction

    public DnnCPInstruction​(CPOperand in,
                            CPOperand in2,
                            CPOperand in3,
                            CPOperand out,
                            String opcode,
                            String istr,
                            ArrayList<CPOperand> stride,
                            ArrayList<CPOperand> padding,
                            ArrayList<CPOperand> input_shape,
                            ArrayList<CPOperand> filter_shape,
                            int numThreads,
                            double intermediateMemoryBudget)

#### DnnCPInstruction

    public DnnCPInstruction​(CPOperand in1,
                            CPOperand in2,
                            CPOperand in3,
                            CPOperand in4,
                            CPOperand in5,
                            CPOperand in6,
                            CPOperand in7,
                            CPOperand in8,
                            CPOperand out1,
                            CPOperand out2,
                            CPOperand out3,
                            CPOperand out4,
                            CPOperand out5,
                            String opcode,
                            String str,
                            int i)

#### DnnCPInstruction

    public DnnCPInstruction​(CPOperand in1,
                            CPOperand in2,
                            CPOperand in3,
                            CPOperand in4,
                            CPOperand in5,
                            CPOperand in6,
                            CPOperand in7,
                            CPOperand in8,
                            CPOperand in9,
                            CPOperand in10,
                            CPOperand in11,
                            CPOperand out,
                            CPOperand out2,
                            CPOperand out3,
                            CPOperand out4,
                            CPOperand out5,
                            String opcode,
                            String istr,
                            double intermediateMemoryBudget)
                     throws DMLRuntimeException

Throws:
  `DMLRuntimeException`

### Method Detail

#### parseInstruction

    public static DnnCPInstruction parseInstruction​(String str)

#### processReluBackwardInstruction

    public void processReluBackwardInstruction​(ExecutionContext ec)

#### processBiasAddInstruction

    public void processBiasAddInstruction​(ExecutionContext ec)

#### processBiasMultiplyInstruction

    public void processBiasMultiplyInstruction​(ExecutionContext ec)

#### processBatchNorm2dInstruction

    public void processBatchNorm2dInstruction​(ExecutionContext ec)

#### processBatchNorm2dBackwardInstruction

    public void processBatchNorm2dBackwardInstruction​(ExecutionContext ec)

#### processInstruction

    public void processInstruction​(ExecutionContext ec)

Description copied from class: `Instruction`
This method should be used to execute the instruction.

Specified by:
  `processInstruction` in class `CPInstruction`
Parameters:
  `ec` - execution context

#### getLineageItem

    public org.apache.commons.lang3.tuple.Pair<String,​LineageItem> getLineageItem​(ExecutionContext ec)

Description copied from interface: `LineageTraceable`
Obtain lineage trace of an instruction with a single output.

Specified by:
  `getLineageItem` in interface `LineageTraceable`
Overrides:
  `getLineageItem` in class `ComputationCPInstruction`
Parameters:
  `ec` - execution context w/ live variables
Returns:
  pair of (output variable name, output lineage item)