Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for ParseModuleOpString (0.23 sec)

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

          return %0 : tensor<1x3xf32>
        }
      }
    )mlir";
    
    TEST_F(AttrsAndConstraintsTest, HasStaticShapeSucceedsWithStaticShapes) {
      OwningOpRef<ModuleOp> module_op = ParseModuleOpString(kModuleStatic);
      ASSERT_TRUE(module_op);
    
      func::FuncOp main_fn = FindMainFuncOp(*module_op);
      ASSERT_THAT(main_fn, NotNull());
    
      Value dot_general_result =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 17:10:32 UTC 2024
    - 22.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/ops/stablehlo_op_quant_spec_test.cc

          return %0 : tensor<1x3xf32>
        }
      }
    )mlir";
    
    TEST_F(IsOpQuantizableStableHloTest, ConstantOpQuantizable) {
      OwningOpRef<ModuleOp> module_op = ParseModuleOpString(kModuleConstantAdd);
      ASSERT_TRUE(module_op);
    
      auto test_func = module_op->lookupSymbol<func::FuncOp>("constant_add");
      ASSERT_THAT(test_func, NotNull());
    
      auto constant_op =
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 04 07:19:09 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/common/lift_as_function_call_test.cc

          return %0 : tensor<1x3xf32>
        }
      }
    )mlir";
    
    TEST_F(LiftAsFunctionCallTest, LiftedFunctionSucceeds) {
      OwningOpRef<ModuleOp> module_op = ParseModuleOpString(kModuleLifted);
      ASSERT_TRUE(module_op);
    
      auto composite_dot_general_fn =
          module_op->lookupSymbol<func::FuncOp>("composite_dot_general_fn_1");
      ASSERT_THAT(composite_dot_general_fn, NotNull());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 10 04:07:09 UTC 2024
    - 26.2K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args_test.cc

                         tf_saved_model::TensorFlowSavedModelDialect>();
      }
    
      // Parses `module_op_str` to create a `ModuleOp`. Checks whether the created
      // module op is valid.
      OwningOpRef<ModuleOp> ParseModuleOpString(
          const absl::string_view module_op_str) {
        auto module_op_ref = parseSourceString<ModuleOp>(module_op_str, &ctx_);
        EXPECT_TRUE(module_op_ref);
        return module_op_ref;
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/cc/constant_fold_test.cc

            func.return %mul : tensor<1024x24x24x3xf32>
          }
        }
      )mlir";
    
      OwningOpRef<ModuleOp> module_op_ref = ParseModuleOpString(kModuleCode);
      const auto test_func =
          module_op_ref->lookupSymbol<func::FuncOp>("test_fold_constant");
      ASSERT_THAT(test_func, NotNull());
    
      Operation* mul_op = FindOperationOfType<TF::MulOp>(test_func);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 04 07:19:09 UTC 2024
    - 10.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/common/quantization_lib/quantization_driver_test.cc

      }
      return spec;
    }
    
    TEST_F(ApplyQuantizationParamsPropagationTest,
           ConstsUsedMultipleTimesAreDuplicated) {
      const OwningOpRef<ModuleOp> module_op_ref =
          ParseModuleOpString(kModuleTFLite);
      func::FuncOp main_fn = FindMainFuncOp(*module_op_ref);
    
      auto op_quant_spec_getter = [&](Operation* op) {
        return GetOpQuantSpec(op, /*disable_per_channel_for_dense_layers=*/false);
      };
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/quantization/common/uniform_quantized_types_test.cc

          %0 = stablehlo.add %arg0, %arg0 : tensor<2x!quant.uniform<i8:f32, 1.000000e+00:0>>
          return %0 : tensor<2x!quant.uniform<i8:f32, 1.000000e+00:0>>
        }
      )mlir";
    
      OwningOpRef<ModuleOp> module_op = ParseModuleOpString(kFullyQuantizedAdd);
      ASSERT_TRUE(module_op);
    
      auto func_op = module_op->lookupSymbol<func::FuncOp>("fully_quantized_add");
      ASSERT_THAT(func_op, NotNull());
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/stablehlo/instrumentations/save_report_test.cc

          return %0 : tensor<1x3xf32>
        }
      )mlir";
    
      const OwningOpRef<ModuleOp> module_op =
          ParseModuleOpString(kModuleWithCompositeDotGeneral);
      ASSERT_TRUE(module_op);
    
      // Create a pass manager with `SaveQuantizationReportInstrumentation` and
      // `QuantizeCompositeFunctionsPass`. Run the passes against `module_op`.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 02:59:01 UTC 2024
    - 9.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/stablehlo/cc/report_test.cc

          return %1 : tensor<1x3x!quant.uniform<i8:f32, 5.000000e+0>>
        }
      )mlir";
    
      const OwningOpRef<ModuleOp> module_op =
          ParseModuleOpString(kQuantizedDotGeneral);
      ASSERT_TRUE(module_op);
    
      const QuantizationReport report(*module_op);
      const QuantizationResults& results = report.GetQuantizationResults();
      ASSERT_THAT(results.results(), SizeIs(1));
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 10:10:34 UTC 2024
    - 18.5K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/common/test_base.h

            tf_executor::TensorFlowExecutorDialect, quant::QuantizationDialect,
            quantfork::QuantizationForkDialect>();
      }
    
      // Parses `module_op_str` to create a `ModuleOp`.
      OwningOpRef<ModuleOp> ParseModuleOpString(
          const absl::string_view module_op_str) {
        return parseSourceString<ModuleOp>(module_op_str, ctx_.get());
      }
    
      // Convenience function that returns the first operation of type `OpT` from
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 04 07:19:09 UTC 2024
    - 3.5K bytes
    - Viewed (0)
Back to top