docs: @Override
      public INDArray[] exec(@NonNull CustomOp op) {
          long st = profilingConfigurableHookIn(op);
  
          if (op.numOutputArguments() == 0 && !op.isInplaceCall()) {
              try {
                  val list = this.calculateOutputShape(op);
                  if (list.isEmpty())
                      throw new ND4JIllegalStateException("Op name " + op.opName() + " failed to execute. You can't execute non-inplace CustomOp without outputs being specified");
  
                  for (LongShapeDescriptor shape : list)
                      op.addOutputArgument(Nd4j.create(shape, false));
  
              } catch (Exception e) {
                  throw new ND4JIllegalStateException("Op name " + op.opName() + " failed to execute. You can't execute non-inplace CustomOp without outputs being specified");
              }
          }
  
          val name = op.opName();
          val context = buildContext();
  
          context.markInplace(op.isInplaceCall());
  
          // transferring rng state
          context.setRngStates(Nd4j.getRandom().rootState(), Nd4j.getRandom().nodeState());
  
          //transferring input/output arrays
          context.setInputArrays(op.inputArguments());
          context.setOutputArrays(op.outputArguments());
  
          // transferring static args
          context.setBArguments(op.bArgs());
          context.setIArguments(op.iArgs());
          context.setTArguments(op.tArgs());
  
          try {
              val result = exec(op, context);
              val states = context.getRngStates();
  
              // pulling states back
              Nd4j.getRandom().setStates(states.getFirst(), states.getSecond());
  
              return result;
          } catch (Exception e) {
              throw new RuntimeException("Op [" + name + "] execution failed", e);
          }
  /*
          val name = op.opName().toLowerCase();
          val hash = op.opHash();
  
          if (name.equals("noop")) {
              return op.outputArguments();
          }
  
          val inputShapes = getInputShapes(op.numInputArguments());
          val inputBuffers = getInputBuffers(op.numInputArguments());
  
          int cnt= 0;
          val inputArgs = op.inputArguments();
          for (val in: inputArgs) {
              if(in == null)
                  throw new NullPointerException("Input argument is null for op " + op.getClass().getName());
  
              if (!in.isEmpty())
                  inputBuffers.put(cnt, in.data().addressPointer());
  
              inputShapes.put(cnt++, in.shapeInfoDataBuffer().addressPointer());
          }
  
          val outputArgs = op.outputArguments();
          for(int i = 0; i < outputArgs.length; i++) {
              if(outputArgs[i] == null)
                  throw new ND4JIllegalStateException("Op output arguments must not be null! Op " + op.getClass().getName());
          }
  
  
          val outputShapes = getOutputShapes(op.numOutputArguments());
          val outputBuffers = getOutputBuffers(op.numOutputArguments());
  
          cnt= 0;
          for (val out: outputArgs) {
              if(out.isEmpty()){
                  outputBuffers.put(cnt, null);
              } else {
                  outputBuffers.put(cnt, out.data().addressPointer());
              }
              outputShapes.put(cnt++, out.shapeInfoDataBuffer().addressPointer());
          }
  
          val iArgs = op.numIArguments() > 0 ? getLongPointerFrom(iArgsPointer,op.numIArguments()) : null;
          val tArgs = op.numTArguments() > 0 ? getDoublePointerFrom(tArgsPointer,op.numTArguments()) : null;
          val bArgs = op.numBArguments() > 0 ? getBooleanPointerFrom(bArgsPointer,op.numBArguments()) : null;
  
          cnt = 0;
          val iArgs1 = op.iArgs();
          for (val i: iArgs1)
              iArgs.put(cnt++, i);
  
          cnt = 0;
          val bArgs1 = op.bArgs();
          for (val b: bArgs1)
              bArgs.put(cnt++, b);
  
          cnt = 0;
          val tArgs1 = op.tArgs();
          for (val t: tArgs1)
              tArgs.put(cnt++, t);
  
          val t = op.numInputArguments();
  
          OpStatus status = OpStatus.ND4J_STATUS_OK;
          try {
              val code = loop.execCustomOp(
                          null,
                          hash,
                          inputBuffers,
                          inputShapes,
                          op.numInputArguments(),
                          outputBuffers,
                          outputShapes,
                          op.numOutputArguments(),
                          tArgs, op.numTArguments(),
                          iArgs, op.numIArguments(),
                          bArgs, op.numBArguments(),
                          op.isInplaceCall());
  
                  status = OpStatus.byNumber(code);
  
                  if (status != OpStatus.ND4J_STATUS_OK)
                      throw new ND4JIllegalStateException("Failed to execute op [" + name + "] with error code [" + status +"]");
              }catch(Exception e) {
                  val sb = new StringBuilder();
                  sb.append("Inputs: [(");
                  for( int i=0; i<inputArgs.length; i++ ){
                      if(i > 0)
                          sb.append("), (");
                      sb.append(Shape.shapeToStringShort(inputArgs[i]));
                  }
                  sb.append(")]. Outputs: [(");
                  for( int i=0; i<outputArgs.length; i++){
                      if(i > 0)
                          sb.append("), (");
                      sb.append(Shape.shapeToStringShort(outputArgs[i]));
                  }
                  sb.append(")]. tArgs: ");
                  if(op.numTArguments() > 0){
                      sb.append(Arrays.toString(op.tArgs()));
                  } else {
                      sb.append("-");
                  }
                  sb.append(". iArgs: ");
                  if(op.numIArguments() > 0){
                      sb.append(Arrays.toString(op.iArgs()));
                  } else {
                      sb.append("-");
                  }
                  if(op instanceof DifferentialFunction){
                      String n = ((DifferentialFunction) op).getOwnName();
                      if(n != null && !n.equals(op.opName())){
                          sb.append(". Op own name: \"").append(n).append("\"");
                      }
                  }
                  log.error("Failed to execute op " + op.opName() + ". Attempted to execute with " +
                                  String.valueOf(op.numInputArguments()) + " inputs, " +
                                  String.valueOf(op.numOutputArguments()) + " outputs, "+
                                  String.valueOf(op.numTArguments()) + " targs and " +
                                  String.valueOf(op.numIArguments()) + " iargs. " +
                                  sb.toString() +
                  " - Please see above message (printed out from c++) for a possible cause of error.");
                  throw e;
          }
  
          profilingConfigurableHookOut(op, st);
  
          return op.outputArguments();
   */
      }