Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 178 for getDefiningOp (0.19 sec)

  1. tensorflow/compiler/mlir/tfrt/runtime_fallback/runtime_fallback_combine.cc

        mlir::tfd::MoveDhtToTftOp move_input_op_0 =
            llvm::dyn_cast_or_null<mlir::tfd::MoveDhtToTftOp>(
                convert_op_input_0.getDefiningOp());
        mlir::tfd::MoveDhtToTftOp move_input_op_1 =
            llvm::dyn_cast_or_null<mlir::tfd::MoveDhtToTftOp>(
                convert_op_input_1.getDefiningOp());
    
        // The inputs should be MoveDhtToTftOp.
        if (!move_input_op_0 || !move_input_op_1) return mlir::failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 09 12:09:19 UTC 2022
    - 3.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/sparsecore/embedding_sequencing.cc

          if (IsTPUOp(input_value.get().getDefiningOp()) &&
              !backward_pass_ops.contains(input_value.get().getDefiningOp()))
            values_to_add_nodes.insert(input_value.get());
      }
    
      for (Value value : values_to_add_nodes) {
        builder.setInsertionPointAfter(value.getDefiningOp());
        std::vector<Type> types(num_replicas, value.getType());
        Location loc = value.getDefiningOp()->getLoc();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/transforms/legalize_variables.td

    include "mlir/IR/PatternBase.td"
    include "tensorflow/compiler/mlir/lite/ir/tfl_ops.td"
    include "tensorflow/compiler/mlir/tensorflow/ir/tf_ops.td"
    
    def HasSupportedElementType :
      Constraint<CPred<"HasSupportedElementType($0.getDefiningOp())">>;
    
    def IsSupportedElementType :
      Constraint<CPred<"IsSupportedElementType($0.getType().cast<ShapedType>())">>;
    
    def LegalizeVarHandle : Pat<
      (TF_VarHandleOp:$result $container, $shared_name),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 16 23:20:46 UTC 2022
    - 1.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/tpu_dynamic_layout_pass.cc

          resource_alias_analysis.GetResourceAliases(resource_iterator);
    
      auto is_generator = [](Value val) {
        if (mlir::isa<BlockArgument>(val)) return true;
        Operation* definition = val.getDefiningOp();
        return definition->getNumOperands() == 0 &&
               definition->getNumResults() == 1;
      };
    
      // Check all generator aliases (ops or function argument) are on CPU.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tensor_device_copy_conversion.cc

        // * the arg to the identity op is produced by a TPUExecuteOp.
        if (op_device && op_device.getValue().contains("TPU")) {
          return true;
        }
    
        Operation *def_op = arg.getDefiningOp();
        // If the arg to this identity op is the arg of a function, there's no
        // defining op.
        if (def_op != nullptr &&
            (isa<TF::TPUExecuteOp, TF::TPUExecuteAndUpdateVariablesOp>(def_op))) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/post_quantize.cc

      output_types.reserve(num_return_operands);
      for (int i = 0; i != num_return_operands; ++i) {
        auto returned_value = terminator->getOperand(i);
        Operation* returned_op = returned_value.getDefiningOp();
        if (returned_op && returned_op->hasOneUse() &&
            llvm::isa<DequantizeOp>(returned_op)) {
          auto dequantize_op = llvm::cast<DequantizeOp>(returned_op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/analysis/resource_dataflow.cc

          ResourceConstructingOps result(global_tensor);
          return result;
        }
      } else if (auto vh = dyn_cast<TF::VarHandleOp>(value.getDefiningOp())) {
        return ResourceConstructingOps(vh);
      } else if (auto it = dyn_cast<TF::IteratorOp>(value.getDefiningOp())) {
        return ResourceConstructingOps(it);
      }
      return ResourceConstructingOps();
    }
    
    ResourceConstructingOps ResourceConstructingOps::join(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/lower_globals_to_ml_program.cc

      }
    
      if (v.getDefiningOp()->getNumOperands() == 1) {
        // If the value is originating from an unary op, assume it's something
        // simple like "cast" and keep tracing.
        return traceUpwardsToArgument(v.getDefiningOp()->getOperand(0), seen, out);
      } else {
        // Typically a tf.VarHandle op.
        return v.getDefiningOp()->emitOpError("Non constant predecessor");
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/remove_var_init_by_const.cc

        Value resource_operand = assign_op.getOperand(0);
        Value assigned_value_operand = assign_op.getOperand(1);
    
        if (isa<TF::VarHandleOp>(resource_operand.getDefiningOp()) &&
            isa<TF::ConstOp>(assigned_value_operand.getDefiningOp())) {
          return success();
        } else {
          return failure();
        }
      }
    
      void rewrite(TF::AssignVariableOp assign_op,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Feb 03 12:04:03 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/odml_converter/folders.cc

      static std::optional<FoldAdaptor> Create(Operation* operation) {
        auto foldable_opr = [](Value val) -> bool {
          return !llvm::isa<BlockArgument>(val) &&
                 llvm::isa<stablehlo::ConstantOp>(val.getDefiningOp());
        };
        if (!llvm::all_of(operation->getOperands(), foldable_opr)) {
          return std::nullopt;
        }
        return FoldAdaptor(operation);
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 06:11:55 UTC 2024
    - 4.5K bytes
    - Viewed (0)
Back to top