Search Options

Results per page
Sort
Preferred Languages
Advance

Results 81 - 90 of 208 for emitError (0.27 sec)

  1. tensorflow/compiler/mlir/lite/experimental/tac/transforms/target_annotation.cc

            !llvm::isa<func::ReturnOp, func::FuncOp, CallableOpInterface>(op)) {
          SetAnnotation(op, kDevice, "CPU", builder);
          device_is_set = true;
        }
      }
      if (!device_is_set) {
        op->emitError("cannot set target device for this ops");
      }
    }
    
    void TargetAnnotationPass::runOnFunction() {
      auto func = getFunction();
      OpBuilder builder(func);
    
      func.walk([&](Operation* op) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 19:32:06 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_custom_aggregation_op_to_quant_stats.cc

      RewritePatternSet patterns(ctx);
      func::FuncOp func = getOperation();
    
      patterns.add<ConvertCustomAggregationOpToQuantStats>(ctx);
      if (failed(applyPatternsAndFoldGreedily(func, std::move(patterns)))) {
        func.emitError()
            << "quant-convert-tf-custom-aggregator-op-to-quant-stats failed.";
        signalPassFailure();
      }
    }
    
    }  // namespace
    
    std::unique_ptr<OperationPass<func::FuncOp>>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/flatbuffer_export.cc

      if (!type) {
        if (auto op = value.getDefiningOp()) {
          error_handler.emitError()
              << '\'' << op << "' should produce value of tensor type instead of "
              << value.getType();
          return false;
        }
        error_handler.emitError("expected tensor type, got ") << value.getType();
        return false;
      }
    
      Type element_type = type.getElementType();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 21:41:49 UTC 2024
    - 164.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

      // params must be at least rank axis + 1
      if (params_rank < axis_i + 1) {
        emitError(result.location, "params must be at least rank axis + 1");
      }
    
      int64_t batch_dims_i = batch_dims.getInt();
      if (batch_dims_i < 0) {
        batch_dims_i += indices_rank;
      }
    
      if (batch_dims_i > axis_i) {
        emitError(result.location,
                  "axis should be bigger than or equal to batch_dims");
      }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_ops.cc

      parser.emitError(
          loc, "tf dialect has no types, potentially meant !tf_type." + spec);
      return nullptr;
    }
    
    Attribute TensorFlowDialect::parseAttribute(DialectAsmParser &parser,
                                                Type type) const {
      StringRef spec = parser.getFullSymbolSpec();
      llvm::SMLoc loc = parser.getCurrentLocation();
      parser.emitError(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/quantization/ir/ConvertSimQuant.cc

      bool *hadFailure;
    
      bool failableRewrite(FakeQuantOp op, PatternRewriter &rewriter) const {
        auto converter = ExpressedToQuantizedConverter::forInputType(op.getType());
        if (!converter) {
          return (op.emitError("unsupported quantized type conversion"), true);
        }
    
        quant::QuantizedType elementType =
            static_cast<const ConcreteRewriteClass *>(this)
                ->convertFakeQuantAttrsToType(op, converter.expressed_type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 08 02:10:16 UTC 2024
    - 6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc

      launch.erase();
    
      return success();
    }
    
    void LaunchToDeviceAttributePass::runOnOperation() {
      const Dialect* tf_dialect = getContext().getLoadedDialect("tf");
      if (!tf_dialect) {
        getOperation().emitError() << "'tf' dialect is not registered";
        return signalPassFailure();
      }
    
      auto result = getOperation().walk([&tf_dialect](tf_device::LaunchOp launch) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

          builder.getStrArrayAttr({kImportModelDefaultGraphFuncName}));
    
      if (input_names.size() != main_func.getNumArguments() ||
          output_names.size() != main_func.getNumResults()) {
        module_op.emitError()
            << "Number of inputs and outputs in the tf.entry_function attribute "
               "mismatched. [Input] Expected: "
            << input_names.size() << ", got: " << main_func.getNumArguments()
    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/lite/stablehlo/transforms/tflite_legalize_hlo.cc

      target.addIllegalOp<mhlo::DotGeneralOp, mhlo::DotOp, mhlo::TransposeOp>();
      if (failed(applyPartialConversion(getOperation(), target,
                                        std::move(patterns)))) {
        getOperation().emitError("mhlo to TFLite legalization failed.");
        signalPassFailure();
      }
    }
    }  // namespace
    
    void PopulateLegalizeHloToTFLitePatterns(RewritePatternSet* patterns,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/cc/report.cc

        return std::nullopt;  // `call_op` is not a quantized function call.
      }
    
      absl::StatusOr<Method> method = GetQuantizationMethod(call_op);
      if (!method.ok()) {
        call_op->emitError() << "Failed to get quantization method: "
                             << method.status().ToString();
        return std::nullopt;
      }
    
      QuantizationResult result{};
      result.mutable_quantizable_unit()->set_name(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
Back to top