Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 54 for emitError (0.13 sec)

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

    // failure.
    template <typename OpT>
    LogicalResult GetOp(Region* region, OpT* result) {
      *result = {};
      for (auto op : region->getOps<OpT>()) {
        if (*result) return op.emitError("should be unique within a function");
        *result = op;
      }
      return success();
    }
    
    LogicalResult RunOnRegion(Region* region) {
      RecvTPUEmbeddingActivationsOp recv_op;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 15 22:55:42 UTC 2024
    - 4.5K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/ir/host_runtime/tfrt_ops.cc

      int32_t container_size =
          get_resource_op->getAttrOfType<mlir::ArrayAttr>("container").size();
    
      if (!(indices_size == shared_name_size &&
            shared_name_size == container_size)) {
        return get_resource_op->emitError()
               << "length of attribute arrays do not match. indices = "
               << indices_size << ", shared_name = " << shared_name_size
               << ", container = " << container_size;
      }
    
      return success();
    }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/convert_tpu_model_to_cpu.cc

      patterns.add<RemoveTpuOp>(ctx);
      patterns.add<RemoveIdentity>(ctx);
    
      if (failed(applyPatternsAndFoldGreedily(module_op, std::move(patterns)))) {
        module_op.emitError() << "quant-convert-tpu-model-to-cpu pattern "
                                 "conversion did not converge.";
        signalPassFailure();
        return;
      }
    }
    
    }  // namespace
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. tensorflow/compiler/mlir/quantization/tensorflow/passes/propagate_quantize_type.cc

      // module level.
      for (auto func : module_op.getOps<func::FuncOp>()) {
        if (failed(applyPatternsAndFoldGreedily(func, frozen_patterns))) {
          func.emitError() << "quant-propagate-quantize-type failed.";
          signalPassFailure();
        }
      }
    }
    
    }  // namespace
    
    // Creates an instance of the TensorFlow dialect PropagateQuantizeType pass.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/utils/fake_quant_utils.h

        }
    
        Value input = tf_op.getInputs();
        int quant_dim = -1;
        auto input_type = mlir::cast<ShapedType>(input.getType());
        if (PerAxis) {
          if (!input_type.hasRank()) {
            tf_op.emitError("The input should have known rank for per-channel op.");
            return failure();
          }
          // This is a special case that the quant_dim is the last dimensions.
          quant_dim = input_type.getRank() - 1;
        }
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.3K bytes
    - Viewed (0)
Back to top