Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 142 for GetOperands (0.21 sec)

  1. tensorflow/compiler/mlir/lite/utils/fake_quant_utils.cc

        // Recreate the operation by using the wrapper's operands and return types.
        // TODO(fengliuai): copy the regions.
        OperationState state(op->getLoc(), op->getName().getStringRef(),
                             parent_op->getOperands(), parent_op->getResultTypes(),
                             op->getAttrs(), op->getSuccessors());
        Operation* inlined = builder.create(state);
    
        parent_op->replaceAllUsesWith(inlined);
        parent_op->erase();
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 03 00:14:05 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

        for (auto operand_and_idx : llvm::enumerate(op->getOperands()))
          TF_RETURN_IF_ERROR(AddEdgeBetweenNodes(operand_and_idx.value(), dst_node,
                                                 operand_and_idx.index()));
    
        operand_offset = op->getNumOperands();
      }
    
      // For all other ops (including tf_executor.island), add remaining edges.
      for (auto operand_and_idx : llvm::enumerate(inst->getOperands()))
        TF_RETURN_IF_ERROR(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.cc

        for (auto operand_and_idx : llvm::enumerate(op->getOperands()))
          TF_RETURN_IF_ERROR(AddEdgeBetweenNodes(operand_and_idx.value(), dst_node,
                                                 operand_and_idx.index()));
    
        operand_offset = op->getNumOperands();
      }
    
      // For all other ops (including tf_executor.island), add remaining edges.
      for (auto operand_and_idx : llvm::enumerate(inst->getOperands()))
        TF_RETURN_IF_ERROR(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 23:04:51 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/stablehlo/transforms/smuggle_disallowed_ops.cc

      SmallVector<NamedAttribute> attrs{op->getAttrs()};
      attrs.push_back(call_target);
      auto custom_call = rewriter.create<mlir::stablehlo::CustomCallOp>(
          op->getLoc(), op->getResultTypes(), op->getOperands(), attrs);
      rewriter.replaceOp(op, custom_call.getResults());
      return success();
    }
    
    }  // namespace
    
    template <typename OpTy>
    class SmuggleOpPattern : public OpRewritePattern<OpTy> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Mar 19 01:14:04 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util.cc

            if (llvm::isa<mlir::TF::TPUPartitionedOutputV2Op>(user)) {
              assert(user->use_empty());
              user->erase();
            }
          }
        }
    
        for (auto operand : cluster.getOperands()) {
          mlir::Operation* def = operand.getDefiningOp();
          if (operand.hasOneUse() &&
              llvm::isa_and_nonnull<mlir::TF::TPUPartitionedInputV2Op>(def)) {
            operand.dropAllUses();
            def->erase();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 13 03:57:18 UTC 2023
    - 4.4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/reduce_type_precision.cc

        auto new_gather_op = rewriter.create<TFL::GatherOp>(
            op.getLoc(),
            /*result=*/
            mlir::cast<TensorType>(op.getResult().getType())
                .clone(builder.getI4Type()),
            /*operand=*/op.getOperands(), op->getAttrs());
        rewriter.replaceAllUsesWith(op.getResult(), new_gather_op.getResult());
    
        return success();
      }
    };
    
    class ReduceTypePrecisionPass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

                       [&](Type type) { return type != resultType; })) {
        p.printGenericOp(op, /*printOpName=*/false);
        return;
      }
    
      p << ' ';
      p.printOperands(op->getOperands());
      p.printOptionalAttrDict(op->getAttrs());
      // Now we can output only one type for all operands and the result.
      p << " : " << resultType;
    }
    
    Operation* getDefiningBroadcastArgsOp(Value operand) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/add_dump_tensor_op.cc

      // PartitionedCallOp does not have kQuantTraitAttrName, and therefore won't
      // get quantized.
      auto new_call_op = rewriter.create<TF::PartitionedCallOp>(
          call_op.getLoc(), call_op.getResultTypes(), call_op.getOperands(),
          FlatSymbolRefAttr::get(new_ref_func_name));
      return new_call_op;
    }
    
    Operation *DuplicateOp(TF::XlaCallModuleOp call_op, PatternRewriter &rewriter,
                           const StringAttr &new_ref_func_name) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 22 22:55:22 UTC 2024
    - 13K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/annotate_parameter_replication.cc

                mlir::cast<IntegerAttr>(mirrored_index).getInt());
          }
        }
        auto func =
            llvm::cast<func::FuncOp>(m.lookupSymbol(cluster_func.getFunc()));
        for (auto entry : llvm::enumerate(cluster_func.getOperands())) {
          auto operand = SkipIdentityAndReadVariable(entry.value());
          auto block_arg = mlir::dyn_cast<BlockArgument>(operand);
          if (block_arg && block_arg.getOwner() == &replicate.GetBody()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_stablehlo_custom_call_to_composite.cc

        auto decomposition = mlir::cast<FlatSymbolRefAttr>(calledComputations[0]);
    
        auto composite = rewriter.create<mlir::stablehlo::CompositeOp>(
            op.getLoc(), op.getResultTypes(), op.getOperands(), name.str(), attrs,
            decomposition.getValue());
        rewriter.replaceOp(op, composite.getResults());
        return success();
      }
    };
    
    struct LegalizeStablehloCustomCallToCompositePass
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.4K bytes
    - Viewed (0)
Back to top