Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 475 for OP (0.12 sec)

  1. tensorflow/compiler/mlir/tfrt/ir/tfrt_fallback_common.h

    template <typename OpTy>
    mlir::LogicalResult VerifyExecuteOpCommon(OpTy op) {
      auto op_attr_array = op.getOpAttrs().getValue();
      for (auto op_attr : op_attr_array) {
        auto key_value = mlir::dyn_cast<mlir::ArrayAttr>(op_attr);
        if (!key_value || key_value.getValue().size() != 2 ||
            !mlir::isa<mlir::StringAttr>(key_value.getValue()[0]))
          return op.emitOpError() << "each op_attr should be a key-value pair, "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/experimental/tac/common/utils.cc

    namespace tac {
    
    bool NotTFLQuantDequantizeOp(Operation* op) {
      if (!op) return false;
      if (llvm::isa<TFL::QuantizeOp, TFL::DequantizeOp>(op)) return false;
      return true;
    }
    
    bool IsTerminatorOp(Operation* op) {
      if (!op) return false;
      return op->hasTrait<OpTrait::IsTerminator>();
    }
    
    // Try to guess the inference type of the op.
    InferenceType GetInferenceType(Operation* op) {
      bool float_type_observed = false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 06 05:37:07 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/experimental/tac/transforms/tac_filter.cc

      for (Operation* op : filtered_ops) {
        auto func = op->getParentOfType<func::FuncOp>();
        func_to_filtered_ops_map[func].push_back(op);
      }
      for (auto& [func, ops] : func_to_filtered_ops_map) {
        std::string interleaved_op_name;
        llvm::raw_string_ostream os(interleaved_op_name);
        llvm::interleaveComma(
            ops, os, [&](Operation* op) { os << "\"" << op->getName() << "\""; });
        os.flush();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/common/attrs_and_constraints.cc

    StringRef GetEntryFunctionName(TF::XlaCallModuleOp op) {
      if (!op->hasAttrOfType<FlatSymbolRefAttr>(
              TF::kStablehloEntryFunctionAttrName)) {
        return StringRef();
      }
      return op
          ->getAttrOfType<FlatSymbolRefAttr>(TF::kStablehloEntryFunctionAttrName)
          .getValue();
    }
    
    bool IsHybridQuantizedOp(Operation* op) {
      if ((op->getNumOperands() != 2 && op->getNumOperands() != 3) ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/lower_variable_ops_to_ml_program.cc

          if (globalOp.getType() != op.getValue().getType()) {
            load = builder.create<TF::CastOp>(op.getLoc(), op.getValue().getType(),
                                              load->getResult(0));
          }
          op.getResult().replaceAllUsesWith(load->getResult(0));
          op.erase();
        });
    
        module.walk([&](TF::AssignVariableOp op) {
          Operation* source = GetHandleSource(op, solver);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Mar 06 23:53:00 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc

      auto result = region.walk([&](Operation* op) -> WalkResult {
        if (op->getDialect() != tf_dialect) return WalkResult::advance();
    
        if (parallel_group_attr) {
          op->setAttr(TF::kParallelExecAnnotation, parallel_group_attr);
        }
        auto device_attr = op->getAttr(kDeviceAttr);
        if (!device_attr) {
          op->setAttr(kDeviceAttr, launch.getDeviceAttr());
          return WalkResult::advance();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/experimental/tac/transforms/device_transform.cc

          }
        }
    
        // Build the new float-versioned op.
        OperationState state(op->getLoc(), op->getName());
        state.operands = dequantized_inputs;
        state.types = result_types;
        state.attributes = op->getAttrs();
        state.successors = op->getSuccessors();
        builder->setInsertionPoint(op);
        Operation* new_op = builder->create(state);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/transforms/verify_tfxla_legalization.cc

          return EmitMustBeConstantError(op);
        }
      }
      return true;
    }
    
    bool IsMhloAndStatic(Operation* op) {
      if (!llvm::isa<mlir::mhlo::MhloDialect>(op->getDialect())) {
        // Skip this op if it isn't an mhlo op.
        return true;
      }
      return IsStaticOperation(op);
    }
    
    bool IsDefaultConversionLegal(
        Operation* op, const ConversionTarget& default_conversion_target) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/pin_ops_with_side_effects.cc

        builder.setInsertionPoint(op);
        Location loc = op->getLoc();
        auto outer_op = builder.create<ControlNodeOp>(
            loc, op->getResultTypes(), ControlType::get(op->getContext()),
            control_tokens);
        Region region;
        Block *new_block = new Block;
        region.push_back(new_block);
        builder.setInsertionPointToEnd(&region.front());
        Operation *inner_op = builder.clone(*op);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/transforms/analyze_variables.cc

    // Returns true if 'op' is TF op that accepts resource type, but is
    // supported by TFLite.
    bool IsSupportedTFLiteResourceOp(Operation* op) {
      return llvm::isa<TF::ReadVariableOp, TF::AssignVariableOp, TF::VarHandleOp,
                       TF::LookupTableFindV2Op, TF::LookupTableImportV2Op,
                       TF::LookupTableSizeV2Op>(op);
    }
    
    // Returns true if 'op' is TF/TFLite control flow op that can accept resource
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
Back to top