Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 89 for getOperands (0.23 sec)

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

        // while creating the ops so make sure there aren't any type changes between
        // the original op operands and the operands during the conversion.
        for (auto&& [old_val, new_val] : llvm::zip(op->getOperands(), operands)) {
          if (old_val.getType() != new_val.getType()) return failure();
        }
    
        auto abstractOp = op->getRegisteredInfo();
        if (!abstractOp) return failure();
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 28 21:49:50 UTC 2024
    - 9.7K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/lite/transforms/raise_custom_ops.cc

      for (auto *op : custom_ops) {
        builder.setInsertionPoint(op);
        Location loc = op->getLoc();
        auto custom_op = builder.create<CustomTfOp>(loc, op->getResultTypes(),
                                                    op->getOperands());
        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: Fri Mar 17 07:31:01 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/stablehlo/passes/merge_fusion_with_dequantize.cc

            func_op.getRegion().getBlocks().front().getTerminator());
        if (!return_op) return failure();
        auto req_op = llvm::dyn_cast_or_null<mlir::stablehlo::UniformQuantizeOp>(
            return_op.getOperands()[0].getDefiningOp());
        if (!req_op) return failure();
    
        // Create a new func.call op with f32 output.
        auto new_call_op = call_op.clone();
        new_call_op->getResult(0).setType(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/transforms/analyze_variables.cc

        // and mark the module as not valid for TFLite legalization.
        // Note: this might disable native variables in more than needed cases.
        // TODO(b/189370197): Enhance variable analysis.
        for (auto operand : op->getOperands()) {
          if (mlir::isa<TF::ResourceType>(
                  getElementTypeOrSelf(operand.getType()))) {
            legalize_to_tfl = false;
            return WalkResult::interrupt();
          }
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/legalize_tf_while.cc

      Operation* op = while_op.getOperation();
      // Create new TFL While op that will be used to replace TF While op.
      auto new_op = OpBuilder(op).create<TFL::WhileOp>(
          op->getLoc(), op->getResultTypes(), op->getOperands(),
          while_op.getIsStateless());
      Location loc = while_op->getLoc();
      CreateRegionWithCall(while_op.cond_function(), new_op.getCond(), loc);
      CreateRegionWithCall(while_op.body_function(), new_op.getBody(), loc);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 3.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tpu_host_computation_expansion.cc

        if (IsTrivialUnaryOperation(&cluster_op) ||
            HasOutsideCompilationAttribute(&cluster_op)) {
          auto walk_result = cluster_op.walk([&](Operation* op) {
            for (Value operand : op->getOperands()) {
              Operation* operand_op = GetOpOfValue(operand);
              if (head_outside_compiled_ops.count(operand_op)) continue;
    
              if (operand_op->getParentRegion() == cluster_region)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/tpu_identity_pruning.cc

    // results.
    void RemoveIdentityFromRegion(Region& region) {
      region.walk([](Operation* op) {
        if (isa<TF::IdentityOp, TF::IdentityNOp>(op)) {
          op->replaceAllUsesWith(op->getOperands());
          op->erase();
        }
      });
    }
    
    void TPUIdentityPruning::runOnOperation() {
      SmallVector<tf_device::ClusterOp, 4> clusters;
      getOperation().walk(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.1K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

        // which should be removed. So the replaced PartitionedCall op should keep
        // its original arguments except for the last element.
        SmallVector<Value> args = call_op.getOperands().drop_back();
    
        rewriter.replaceOpWithNewOp<TF::PartitionedCallOp>(
            call_op, float_func.getResultTypes(), args, f_attr);
        return success();
      }
    };
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

    template <typename OpT>
    OpT AddOperandAndRewriteAs(Operation* op, Value operand, NamedAttrList attr,
                               OpBuilder* builder) {
      builder->setInsertionPoint(op);
      auto operands = llvm::to_vector<4>(op->getOperands());
      operands.push_back(operand);
      auto new_op = builder->create<OpT>(op->getLoc(), op->getResultTypes(),
                                         operands, attr.getAttrs());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfr/passes/canonicalize.cc

          }
          // Map the block arguments to the yield results.
          for (auto iter_op : llvm::zip(for_op.getRegionIterArgs(),
                                        terminator_op->getOperands())) {
            mapping.map(std::get<0>(iter_op), std::get<1>(iter_op));
          }
          rewriter.eraseOp(terminator_op);
        }
        SmallVector<Value, 4> returned;
        for (Value arg : for_op.getRegionIterArgs()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jan 14 22:15:06 UTC 2023
    - 6.8K bytes
    - Viewed (0)
Back to top