Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for module_ctor (0.34 sec)

  1. tensorflow/cc/saved_model/testdata/generate_saved_models.py

        print("Allowed ModuleNames:", MODULE_CTORS.keys())
        return 1
    
      _, export_path, module_name = args
      module_ctor, version = MODULE_CTORS.get(module_name)
      if not module_ctor:
        print("Expected ModuleName to be one of:", MODULE_CTORS.keys())
        return 2
      os.makedirs(export_path)
    
      tf_module = module_ctor()
      if version == 2:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Sep 18 18:06:18 UTC 2023
    - 4.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tf_mlir_translate_main.cc

      if (import_saved_model_object_graph) {
        mlir::MLIRContext context;
        auto module_or = tensorflow::SavedModelObjectGraphToMlirImport(
            input_filename, tags, exported_names, &context);
        if (!module_or.status().ok()) return 1;
    
        module_or.value()->print(output->os());
      } else if (import_saved_model_signature_defs) {
        mlir::MLIRContext context;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 08 01:19:25 UTC 2023
    - 7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate.cc

      auto module_or = GraphdefToMlirImport(
          input, input_arrays, input_dtypes, input_shapes, output_arrays,
          control_output_arrays, import_options, context);
      if (!module_or.status().ok()) {
        LOG(ERROR) << "Graph import failed: " << module_or.status();
        return module_or.status();
      }
      auto& module = module_or.value();
      std::srand(0);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 07 11:51:44 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/python/integration_test/quantize_model_test.py

          if activation_fn is nn_ops.relu6:
            self.assertRegex(module_str, r'stablehlo.clamp.*\n.*return')
          elif activation_fn is nn_ops.relu:
            self.assertRegex(module_str, r'stablehlo.maximum.*\n.*return')
        else:
          # Check activation functions are implicit.
          self.assertNotRegex(module_str, r'stablehlo.clamp.*\n.*return')
          self.assertNotRegex(module_str, r'stablehlo.maximum.*\n.*return')
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 51.4K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tf2xla/internal/legalize_tf_mlir_test.cc

          func.return %0 : tensor<1xi32>
        }
      })";
    
    absl::StatusOr<std::string> CompileMlirModule(bool compile_to_xla_hlo,
                                                  const char* module_str) {
      MlirToHloArgs mlir_to_hlo_args;
      mlir_to_hlo_args.mlir_module = module_str;
    
      std::vector<TensorShape> arg_shapes;
      TPUCompileMetadataProto metadata_proto;
      bool use_tuple_args = true;
      std::vector<ShardingAndIndex> arg_core_mapping;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sun Apr 14 20:29:34 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/utils/xla_rewrite_util_test.cc

      if (!status.ok()) {
        return status;
      }
      return mlir_module;
    }
    
    TEST(XlaRewriteUtilTest, TestEraseClusterFuncs) {
      static const char* const module_str =
          R"(
    module attributes {tf.devices = ["/job:worker/replica:0/task:0/device:CPU:0", "/job:worker/replica:0/task:0/device:GPU:0"]} {
      func.func @convert_cluster_func(%arg0: tensor<i32>) -> () {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/translate/tf_mlir_translate_registration.cc

          enable_soft_placement,  set_original_tf_func_name};
    
      auto module_or = tensorflow::GraphdefToMlirTranslateFunction(
          input, input_arrays, input_dtypes, input_shapes, output_arrays,
          control_output_arrays, options, context);
      if (!module_or.status().ok()) return nullptr;
      return std::move(module_or).value();
    }
    
    static TranslateToMLIRRegistration GraphdefToMlirTranslate(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jun 12 22:19:26 UTC 2024
    - 7.8K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/python/mlir.cc

      mlir::MLIRContext context(registry);
      auto module_or = ConvertSavedModelToMlir(
          &bundle, &context, absl::Span<std::string>(exported_names));
      if (!module_or.status().ok()) {
        tsl::Set_TF_Status_from_Status(status, module_or.status());
        return "// error";
      }
    
      return MlirModuleToString(*std::move(module_or).value(), show_debug_info);
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:16:49 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  9. tensorflow/cc/experimental/libtf/mlir/mlir_transform.cc

                          ->cast<mlir::MLIRContext*>();
    
      // Load the saved model into MLIR TF dialect.
      absl::Span<std::string> exported_names(nullptr, 0);
      auto module_or =
          tensorflow::ConvertSavedModelToMlir(&bundle, context, exported_names);
      if (!module_or.status().ok()) {
        return None();
      }
    
      // Make a module to wrap MLIR module and allow getting strings and running
      // transforms.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Jul 12 16:28:19 UTC 2022
    - 3K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/lite/tf_to_tfl_flatbuffer.cc

      if (saved_model_version == 2) {
        auto module_or = SavedModelObjectGraphToMlirImport(
            input_filename, tags, exported_names, context,
            /*unconditionally_use_set_output_shapes=*/true);
        if (!module_or.status().ok()) return module_or.status();
        return std::move(module_or).value();
      } else if (saved_model_version == 1) {
        MLIRImportOptions options;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 03 18:01:23 UTC 2024
    - 23.8K bytes
    - Viewed (0)
Back to top