Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 15 for getStrArrayAttr (0.29 sec)

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

          module.getLoc(), name,
          FunctionType::get(module.getContext(), /*inputs=*/{}, /*results=*/{}));
    
      // Make savedmodel verification happy.
      init->setAttr("tf_saved_model.exported_names",
                    builder.getStrArrayAttr({name}));
    
      builder.setInsertionPointToStart(init.addEntryBlock());
    
      for (func::FuncOp func : tf_saved_model::GetInitializerFunctions(module)) {
        if (func.getNumArguments() != 0) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Feb 01 05:03:09 UTC 2023
    - 3.6K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

      // Set the insertion point right before the return op.
      builder.setInsertionPoint(&region.back().back());
    
      StringAttr output_file_path_attr = builder.getStringAttr(output_file_path);
      ArrayAttr ids_attr = builder.getStrArrayAttr(ids);
      ArrayAttr calibration_methods_attr =
          builder.getI32ArrayAttr(calibration_methods);
      builder.create<TF::CalibrationStatisticsSaverOp>(
          region.getLoc(), statistics_outputs, output_file_path_attr, ids_attr,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/utils/tpu_rewrite_device_util_test.cc

                       builder.getIntegerAttr(builder.getIntegerType(64), 1));
      cluster->setAttr(kTopologyAttr, builder.getStringAttr(""));
      cluster->setAttr(kDeviceAssignmentAttr,
                       builder.getStrArrayAttr(llvm::ArrayRef<llvm::StringRef>(
                           {"bad_device_assigment"})));
    
      mlir::TF::RuntimeDevices runtime_devices;
      std::string host_device;
      EXPECT_TRUE(mlir::failed(
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Apr 26 09:37:10 UTC 2024
    - 46.8K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/add_functions_for_exported_names.cc

    // contain the given string.
    void SetExportedName(func::FuncOp f, StringRef name) {
      OpBuilder b(f);
      f->removeAttr(kTfSavedModelExportedNamesAttr);
      f->setAttr(kTfSavedModelExportedNamesAttr, b.getStrArrayAttr({name}));
    }
    
    // Convert a savedmodel public function into a private function.
    // This means we need to remove any attributes that are only allowed
    // on exported (public) functions.
    void Unexport(func::FuncOp f) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 08:06:04 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/transforms/tf_saved_model_asset_sinking_pass.cc

                            main_func.getFunctionType().getResults()));
      // Name of the main function for the eventual executable needs to be set.
      main_func->setAttr(kTfSavedModelExportedNamesAttr,
                         builder.getStrArrayAttr({func_name}));
      main_func->setAttr(
          kTfSavedModelInitializerTypeAttr,
          builder.getStringAttr(kTfSavedModelInitializerRestoreType));
      module->setAttr("tf_saved_model.semantics",
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args.cc

        new_arg_attrs.emplace_back(arg_attr);
      }
    
      const NamedAttribute index_path_attr(
          builder.getStringAttr(kTfSavedModelIndexPathAttr),
          builder.getStrArrayAttr({index_path}));
    
      new_arg_attrs.emplace_back(index_path_attr);
      return new_arg_attrs;
    }
    
    // Strips the "assets/" directory prefix, if `filename` begins with it. The
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.4K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tf2xla/internal/passes/tpu_sharding_identification_pass.cc

      // Update input/output sharding attributes on tf_device.cluster_func op.
      cluster_func->setAttr(tensorflow::kInputShardingAttr,
                            GetStrArrayAttr(builder, sharding_for_args));
      cluster_func->setAttr(tensorflow::kOutputShardingAttr,
                            GetStrArrayAttr(builder, sharding_for_rets));
      return mlir::success();
    }
    
    void TPUShardingIdentificationPass::runOnOperation() {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/initialize_variables_in_session_init.cc

      auto func = builder.create<func::FuncOp>(module->getLoc(),
                                               kSessionInitFuncName, func_type);
      func->setAttr(kTfSavedModelExportedNamesAttr,
                    builder.getStrArrayAttr({kSessionInitFuncName}));
      func->setAttr(kTfSavedModelInitializerTypeAttr,
                    builder.getStringAttr(kTfSavedModelInitializerRestoreType));
      func.setVisibility(mlir::func::FuncOp::Visibility::Public);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 23 09:05:47 UTC 2024
    - 7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/stablehlo/transforms/tfl_stablehlo_pass.cc

                  temp.push_back(conf_str);
                }
                ArrayRef<StringRef> values(temp);
                auto named_attr =
                    builder->getNamedAttr(key, builder->getStrArrayAttr(values));
                attrs.push_back(named_attr);
              }
    
              break;
            }
            case flexbuffers::FBT_VECTOR: {
              if (std::string{key} == "dimension_numbers") {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Jan 24 06:08:43 UTC 2024
    - 10.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/tensorflow/passes/merge_save_function_ops_to_main.cc

      // newly created argument.
      main_func_op.setArgAttr(new_file_prefix_arg.getArgNumber(),
                              /*name=*/kTfSavedModelIndexPathAttr,
                              /*value=*/builder.getStrArrayAttr({kTfFilePrefix}));
    
      // Append the "__tf_file_prefix:0" to the "tf.entry_function" attribute's
      // item keyed by "inputs".
      AddEntryFunctionInput(Twine(kTfFilePrefix).concat(":0").str(), main_func_op);
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 10.7K bytes
    - Viewed (0)
Back to top