Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 83 for getDefiningOp (0.16 sec)

  1. tensorflow/compiler/mlir/tf2xla/transforms/tf2xla_rewriter.cc

          xla::HloFunctionImporter::ImportInstructions(
              *hlo_module->entry_computation(), arguments, symbol_table, &builder));
    
      mhlo::TupleOp root_tuple =
          mlir::dyn_cast_or_null<mhlo::TupleOp>(root_value.getDefiningOp());
      if (!root_tuple) {
        return tsl::errors::InvalidArgument(
            "Imported XLA Root Value is not a tuple op");
      }
    
      return root_tuple;
    }
    
    LogicalResult Tf2XlaRewriter::PrepareParams() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:16:07 UTC 2024
    - 18.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/convert_tf_quant_to_mhlo_int_test.cc

              "Func must have ReturnOp as last op and must return 1 value");
        }
        auto def_op = return_op.getOperand(0).getDefiningOp();
        auto fold_results = ConstantFoldOpIfPossible(def_op);
        if (fold_results.size() != 1 ||
            !llvm::isa<TF::ConstOp>(fold_results[0].getDefiningOp())) {
          return absl::InternalError("Failed to evaluate TF ops");
        }
    
        // Convert output tensor back to xla::Literal.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 01:03:21 UTC 2024
    - 35.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.cc

      std::stack<Operation*> op_stack;
      while (!value_queue.empty()) {
        Value current_value = value_queue.front();
        value_queue.pop();
    
        Operation* defining_node = current_value.getDefiningOp();
        if (defining_node == nullptr) continue;
        op_stack.push(defining_node);
        for (Value arg : defining_node->getOperands()) {
          if (!argument_set.contains(arg.getImpl())) {
            value_queue.push(arg);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 17 17:58:54 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_variable_runtime_reformatting.cc

                       llvm::SmallPtrSet<Operation*, 4>* skipped = nullptr) {
      while (auto result = mlir::dyn_cast<OpResult>(v)) {
        if (!(allow_other_use || v.hasOneUse())) break;
        auto op = result.getDefiningOp();
        if (!llvm::isa<TF::IdentityOp, TF::IdentityNOp>(op)) {
          break;
        }
        v = op->getOperand(result.getResultNumber());
        if (skipped) skipped->insert(op);
      }
      return v;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/utils/lstm_utils_test.cc

      // we set its value as a const tensor of specified size and value 0.
      EXPECT_TRUE(
          mlir::cast<ElementsAttr>(mlir::cast<mlir::arith::ConstantOp>(
                                       it->getOpOperand(15).get().getDefiningOp())
                                       .getValue())
              .getValues<FloatAttr>()[0]
              .getValue()
              .isExactlyValue(0.0f));
    
      EXPECT_EQ(fused_lstm_func_.getFunctionType().getNumResults(), 1);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tfr/passes/raise_to_tf.cc

          continue;
        }
    
        // The index is valid for the call_op.
        Value input = call_op.getOperand(operand.index());
        Operation* input_op = input.getDefiningOp();
        auto input_tfr_type =
            signature.getFunctionType().getInputs()[operand.index()];
    
        // There are three cases for the preceding input_op:
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/common/lift_as_function_call_test.cc

                             FunctionCallOpType::TFXlaCallModuleOp,
                             "composite_dot_general_fn", operands, results,
                             attributes)[0]
              .getDefiningOp();
      const auto entry_function_symbol_ref =
          lifted_op->getAttrOfType<FlatSymbolRefAttr>("_entry_function");
      SymbolTable symbol_table(*module_op);
      auto entry_func = dyn_cast_or_null<func::FuncOp>(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/host_runtime/tpu_merge_variables_with_execute.cc

            operand.value().get().getDefiningOp());
        if (!read_op) continue;
        if (check_same_region &&
            read_op->getParentRegion() != execute_parent->getParentRegion())
          continue;
    
        auto resource = read_op.getResource();
        if (check_device) {
          // TODO(lyandy): Wrap resource ops in tf_device.launch.
          if (auto* resource_op = resource.getDefiningOp()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 29 17:52:11 UTC 2024
    - 27K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc

          return cond;
    
      OpBuilder builder(op);
      Value to_bool = builder.create<TF::ToBoolOp>(op->getLoc(), cond);
      CopyDeviceAndUnderscoredAttributes(op, to_bool.getDefiningOp());
      return to_bool;
    }
    
    // Transform a functional IfOp to a region based IfRegionOp.
    LogicalResult ConvertIfOp(IfOp if_op) {
      Value cond = ConvertConditionToBoolean(if_op, if_op.getCond());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/tpu_device_propagation.cc

        if (mlir::isa<tf_executor::ControlType>(operand.getType())) break;
    
        if (is_switch &&
            llvm::isa_and_nonnull<tf_executor::LoopCondOp>(operand.getDefiningOp()))
          continue;
    
        auto it = value_to_device.find(operand);
        if (it == value_to_device.end()) return llvm::StringRef();
    
        if (new_device.empty()) {
          new_device = it->getSecond();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top