Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 46 for getOperandTypes (0.28 sec)

  1. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types.cc

      return mlir::isa<QuantizedType>(element_type);
    }
    
    bool IsOpFullyQuantized(Operation* op) {
      return llvm::all_of(op->getOperandTypes(), IsQuantizedTensorType) &&
             llvm::all_of(op->getResultTypes(), IsQuantizedTensorType);
    }
    
    bool IsOpNotQuantized(Operation* op) {
      return !llvm::any_of(op->getOperandTypes(), IsQuantizedTensorType) &&
             !llvm::any_of(op->getResultTypes(), IsQuantizedTensorType);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/passes/rewrite_quantized_io.cc

            return;
          }
        }
    
        auto new_func_type = builder.getFunctionType(block.getArgumentTypes(),
                                                     terminator->getOperandTypes());
        func.setType(new_func_type);
      });
    }
    
    // Creates an instance of the pass to decompose the TF ops.
    std::unique_ptr<OperationPass<ModuleOp>> CreateRewriteQuantizedIOPass() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/ir/tf_traits.h

          if (!mlir::tf_type::HasCompatibleElementTypes(type, result_type))
            return op->emitOpError()
                   << "requires all return types to have compatible element types";
        }
        for (auto operand_type : op->getOperandTypes()) {
          if (!mlir::tf_type::HasCompatibleElementTypes(
                  operand_type, type, /*may_ignore_ref_type_lhs=*/true))
            return op->emitError() << "requires all operands and results to have "
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/passes/bridge/verify_quant_legalization.cc

    void VerifyQuantLegalization::runOnOperation() {
      Operation* func_op = getOperation();
    
      auto walk_result = func_op->walk([&](Operation* op) {
        // Verify all uq and qint types are lowered.
        if (llvm::any_of(op->getOperandTypes(), IsQuantType) ||
            llvm::any_of(op->getResultTypes(), IsQuantType) ||
            IsTFUniformQuantizedOp(op) || IsMhloUniformQuantizedOp(*op)) {
          op->emitOpError("is illegal as it is a UQ op or contains uq/qint types");
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 3.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/transforms/raise_custom_ops.cc

        Block *new_block = new Block;
        region.push_back(new_block);
    
        builder.setInsertionPointToEnd(&region.front());
        Operation *inner_op = builder.clone(*op);
    
        new_block->addArguments(op->getOperandTypes(),
                                SmallVector<Location>(op->getNumOperands(), loc));
        for (const auto &idx_args : llvm::enumerate(new_block->getArguments())) {
          inner_op->setOperand(idx_args.index(), idx_args.value());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 4.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/constant_fold.cc

                  tensor_type.getElementType().getIntOrFloatBitWidth();
        }
        return size;
      };
    
      int64_t results_size = get_size(inst->getResultTypes());
      int64_t operands_size = get_size(inst->getOperandTypes());
    
      constexpr int kSizeFactor = 2;
    // TODO(b/233827625): Remove TF_DISABLE_CONSTANT_FOLDING macro.
    #ifdef TF_DISABLE_CONSTANT_FOLDING
      constexpr int64_t kResultsSizeThreshold = 0;
    #else
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/decompose_reduce_dataset.cc

                                  Location loc) {
      auto& cond_region = dataset_while.getCond();
      Block* cond_block = builder.createBlock(&cond_region);
      auto while_input_types = dataset_while.getOperandTypes();
      cond_block->addArguments(
          while_input_types, SmallVector<Location>(while_input_types.size(), loc));
      builder.create<YieldOp>(loc, cond_block->getArgument(0));
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

                         func_op.getArgumentTypes().end());
        auto& return_op = func_op.getBody().getBlocks().front().back();
        result_types.append(return_op.getOperandTypes().begin(),
                            return_op.getOperandTypes().end());
        for (const auto& arg : func_op.getArguments()) {
          arg_locs.push_back(arg.getLoc());
        }
      }
    
      // Creates a new main function.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/shape_inference.cc

              /// propagated to the callee.
              return isa<CallOpInterface>(caller) &&
                     std::equal(caller->getOperandTypes().begin(),
                                caller->getOperandTypes().end(),
                                callers.front()->getOperandTypes().begin());
            })) {
          if (llvm::any_of(callers, [](Operation* op) {
                return isa<IfOp, WhileOp, CaseOp>(op);
              }))
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jun 08 07:28:49 UTC 2024
    - 134.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/ir/QuantOps.cc

        return emitOpError(
            "has unmatched operands/results number and spec attributes number");
    
      // Verify that quantization specifications are valid.
      for (auto input : llvm::zip(getOperandTypes(), getInputSpecs())) {
        Type inputType = std::get<0>(input);
        Attribute inputSpec = std::get<1>(input);
        if (!isValidQuantizationSpec(inputSpec, inputType)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.3K bytes
    - Viewed (0)
Back to top