Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 493 for OP (0.05 sec)

  1. tensorflow/compiler/mlir/tensorflow/transforms/extract_tpu_copy_with_dynamic_shape_op.cc

        if (isa<TF::TPUCopyWithDynamicShapeOp>(op)) {
          if (failed(CheckOpIsValid(op))) return WalkResult::interrupt();
          if (CanMove(op)) {
            tpu_copy_with_dynamic_shape_ops.push_back(op);
          }
        }
        return WalkResult::advance();
      });
      if (walk_result.wasInterrupted()) return signalPassFailure();
    
      for (Operation* op : tpu_copy_with_dynamic_shape_ops) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/hoist_loop_invariant.cc

    }
    
    bool ShouldMoveOutOfRegion(
        Operation *op, Region *region,
        const llvm::DenseSet<ResourceHandle> &read_only_vars) {
      return ResourceOpCanBeHoisted(op, region, read_only_vars) ||
             (isMemoryEffectFree(op) && isSpeculatable(op));
    }
    
    bool OnlyHasReadEffect(Operation *op) {
      auto interface = llvm::dyn_cast<MemoryEffectOpInterface>(op);
      if (!interface) return false;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tfrt/analysis/cost_analysis.cc

      for (auto& op : *block) {
        EvaluateCost(&op);
      }
    }
    
    void CostAnalysis::EvaluateCost(mlir::Operation* op) {
      if (auto cost_function =
              mlir::dyn_cast<tfrt::compiler::CostFunctionInterface>(op)) {
        cost_map_[op] = cost_function.cost();
        return;
      }
    
      if (!llvm::isa<mlir::TF::TensorFlowDialect>(op->getDialect())) {
        cost_map_[op] = max_arg_size_;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_tpu_embedding_ops.cc

      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());
      op->replaceAllUsesWith(new_op.getOperation()->getResults());
      op->erase();
      return new_op;
    }
    
    // Returns success if the function has at most one op of the template type and
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/stablehlo/passes/convert_func_to_bfloat16.cc

              op->getLoc(), op.getOperand().getType(), adaptor.getOperand());
          rewriter.replaceOpWithNewOp<mlir::stablehlo::BitcastConvertOp>(
              op, op.getResult().getType(), output);
        } else {
          // Both input/output are f32. Convert to no-op.
          rewriter.replaceOp(op, adaptor.getOperand());
        }
        return success();
      }
    };
    }  // namespace
    
    #define GEN_PASS_DEF_CONVERTFUNCTOBFLOAT16PASS
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/tpu_partitioned_op_conversion.cc

            op.getLoc(), op.getType(), op.getOperands(),
            builder.getI64ArrayAttr(partition_dims), builder.getBoolAttr(false),
            op.get_XlaShardingAttr());
        op->replaceAllUsesWith(pi);
      } else {
        auto po = builder.create<TF::TPUPartitionedOutputV2Op>(
            op.getLoc(), op.getResultTypes(), op.getOperand(),
            builder.getI64ArrayAttr(partition_dims), op.get_XlaShardingAttr());
    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/lite/experimental/tac/common/utils.h

    namespace mlir {
    namespace TFL {
    namespace tac {
    
    // Returns true if 'op' is non const op. Returns false otherwise or if
    // 'op' is null.
    inline bool IsNonConstOp(Operation* op) {
      if (!op) return false;
      if (llvm::isa<arith::ConstantOp, mlir::func::ConstantOp>(op)) return false;
      if (op->hasTrait<OpTrait::ConstantLike>()) return false;
      if (llvm::isa<TFL::ConstOp, TFL::QConstOp>(op)) return false;
      return true;
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/common/lift_as_function_call.h

    // Checks if an op is inside a lifted function.
    // If the given op pointer is a nullptr, returns false.
    bool IsInLiftedFunc(Operation* op);
    
    // Checks if the op is inside a StableHLO op with region.
    // If the given op pointer is a nullptr, returns false.
    bool IsInStableHloOpRegion(Operation* op);
    
    // Checks if a given einsum op is supported for XlaDotV2 quantization.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/fold_broadcast.cc

            return true;
          };
    
      return RewriteOp(op, rewriter, get_broadcasted_shape);
    }
    
    template <typename Op>
    LogicalResult ConvertResultsBroadcastableShapeOp::RewriteEqOp(
        Operation* op, PatternRewriter& rewriter) const {
      auto eq_op = llvm::dyn_cast_or_null<Op>(op);
      if (eq_op && eq_op.getIncompatibleShapeError())
        return RewriteOp(op, rewriter, OpTrait::util::getBroadcastedShape);
      return failure();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/nchw_convolution_to_nhwc.cc

            op.getLoc(), /*resultType0=*/new_conv_output_tensor_type,
            /*lhs=*/input_transpose_op,
            /*rhs=*/filter_transpose_op,
            /*window_strides=*/op.getWindowStridesAttr(),
            /*padding=*/op.getPaddingAttr(),
            /*lhs_dilation=*/op.getLhsDilationAttr(),
            /*rhs_dilation=*/op.getRhsDilationAttr(),
            /*window_reversal=*/op.getWindowReversalAttr(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.2K bytes
    - Viewed (0)
Back to top