Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for float_op (0.23 sec)

  1. tensorflow/compiler/mlir/lite/quantization/lite/quantize_model_test.cc

      ASSERT_THAT(op->outputs, SizeIs(1));
    
      auto float_graph = readonly_model_->subgraphs()->Get(0);
      auto float_op = float_graph->operators()->Get(0);
      const int float_input0_idx = float_op->inputs()->Get(0);
      const int float_input1_idx = float_op->inputs()->Get(1);
      const int float_output_idx = float_op->outputs()->Get(0);
      ASSERT_THAT(float_graph->tensors()->Get(float_input0_idx)->type(),
                  Eq(TensorType_FLOAT32));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 23:15:24 UTC 2024
    - 73.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_utils.h

            rewriter.setInsertionPoint(quantizing_op);
            Operation* float_op = rewriter.clone(*quantizing_op);
            quantizing_op->setAttr(kDebugModeOpQuantAttrName,
                                   rewriter.getUnitAttr());
            float_op->setAttr(kDebugModeOpFloatAttrName, rewriter.getUnitAttr());
            RewireFloatModelBackbone(quantizing_op, float_op);
            return success();
          }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 24 20:30:06 UTC 2024
    - 41.7K bytes
    - Viewed (0)
  3. tensorflow/c/while_loop_test.cc

          params_->body_graph, "FakeQuantWithMinMaxArgs", "float_op");
      TF_AddInput(desc, params_->body_inputs[0]);
      TF_FinishOperation(desc, s_);
      ASSERT_EQ(TF_INVALID_ARGUMENT, TF_GetCode(s_));
      string msg(TF_Message(s_));
      EXPECT_NE(msg.find("Input 'inputs' passed int32 expected float while "
                         "building NodeDef 'float_op'"),
                msg.npos);
      TF_AbortWhile(params_.get());
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 11 06:05:56 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  4. test/floatcmp.go

    }
    
    func main() {
    	bad := false
    	for _, t := range tests {
    		if t.expr != t.want {
    			if !bad {
    				bad = true
    				println("BUG: floatcmp")
    			}
    			println(t.name, "=", t.expr, "want", t.want)
    		}
    	}
    	if bad {
    		panic("floatcmp failed")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 12 18:17:49 UTC 2013
    - 3K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/rewrite_util.h

    template <typename T>
    DenseElementsAttr GetScalarOfType(Type ty, T raw_value) {
      RankedTensorType scalar_ty = RankedTensorType::get({}, ty);
      if (auto float_ty = mlir::dyn_cast<FloatType>(ty)) {
        FloatAttr attr = FloatAttr::get(float_ty, raw_value);
        return DenseElementsAttr::get(scalar_ty, attr);
      } else if (auto int_ty = mlir::dyn_cast<IntegerType>(ty)) {
        IntegerAttr attr = IntegerAttr::get(int_ty, raw_value);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 22 19:47:48 UTC 2024
    - 4K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantized_function_library_tf_drq.mlir

        // a very expensive pattern.
        %round_cst = "tf.Const"() {value = dense<0.5> : tensor<f32>} : () -> tensor<f32>
        %float_zp = "tf.Cast"(%zp) {Truncate = false} : (tensor<*xi32>) -> tensor<*xf32>
        %zp_plus_round_cst = "tf.AddV2"(%float_zp, %round_cst) : (tensor<*xf32>, tensor<f32>) -> tensor<*xf32>
    
        %div = "tf.Div"(%input, %scale) : (tensor<*xf32>, tensor<*xf32>) -> tensor<*xf32>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 03 15:43:38 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantized_function_library.mlir

      func.func @quantize_i8(%input : tensor<*xf32>, %scale : tensor<*xf32>, %zp : tensor<*xi32>) -> tensor<*xi8> {
        %float_zp = "tf.Cast"(%zp) {Truncate = false} : (tensor<*xi32>) -> tensor<*xf32>
        %div = "tf.Div"(%input, %scale) : (tensor<*xf32>, tensor<*xf32>) -> tensor<*xf32>
        %add = "tf.AddV2"(%div, %float_zp) : (tensor<*xf32>, tensor<*xf32>) -> tensor<*xf32>
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jan 08 01:16:10 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo.cc

      if (!sgn_splat) return false;
    
      auto splat = dyn_cast<SplatElementsAttr>(float_or_int);
      if (auto float_spl = llvm::dyn_cast_if_present<FloatAttr>(splat),
          sgn_cst_spl = llvm::dyn_cast_if_present<FloatAttr>(sgn_splat);
          float_spl && sgn_cst_spl) {
        return IsSign(float_spl.getValue(), sgn_cst_spl.getValue());
      }
      if (auto int_spl = llvm::dyn_cast_if_present<IntegerAttr>(splat),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 154.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tf2xla/transforms/legalize_tf.cc

            op.getLoc(),
            ChangeTensorElementType(&rewriter, out_type, rewriter.getF32Type()), l,
            r);
    
        auto floor_op =
            rewriter.create<ConvertOp>(op.getLoc(), out_type, intermediate);
        rewriter.replaceOp(op, floor_op.getResult());
        return success();
      }
    };
    
    class ConvertBroadcastToOp : public OpRewritePattern<TF::BroadcastToOp> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jun 11 20:00:43 UTC 2024
    - 291.8K bytes
    - Viewed (0)
Back to top