Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 908 for starts_with (0.19 sec)

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

    };
    
    bool ShouldStripAttr(NamedAttribute &namedAttr) {
      StringRef name = namedAttr.getName().strref();
      if (name.starts_with("tf.") || name.starts_with("tf_")) return true;
      StringRef value = namedAttr.getValue().getDialect().getNamespace();
      return value == "tf" || value.starts_with("tf_");
    }
    
    void StripFunction(func::FuncOp func) {
      auto stripAttrs = llvm::to_vector<4>(llvm::make_filter_range(
          func->getAttrs(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 08:06:04 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/add_functions_for_exported_names.cc

        for (NamedAttribute a : attrs) {
          if (a.getName().strref().starts_with("tf_saved_model.")) {
            f.removeArgAttr(i, a.getName());
          }
        }
      }
      for (int i = 0; i < f.getNumResults(); ++i) {
        for (NamedAttribute a : f.getResultAttrs(i)) {
          if (a.getName().strref().starts_with("tf_saved_model.")) {
            f.removeResultAttr(i, a.getName());
          }
        }
      }
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 08:06:04 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/quantization/tensorflow/passes/quantize_composite_functions.cc

                                         const bool merged_with_dequantize,
                                         const bool is_hybrid) {
      if (func_name.starts_with(kQuantizedFuncPrefix)) return func_name.str();
      if (!func_name.starts_with(kCompositeFuncPrefix)) return "";
    
      auto base_function_name =
          llvm::Twine(kQuantizedFuncPrefix)
              .concat(llvm::Twine(func_name.substr(kCompositeFuncPrefix.size())
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 54.5K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/quantization/stablehlo/cc/report.cc

    // `QuantizationResult`. Otherwise, it returns `std::nullopt`.
    std::optional<QuantizationResult> GetQuantizationResult(func::CallOp call_op) {
      const StringRef callee_name = call_op.getCalleeAttr().getValue();
      if (!callee_name.starts_with(kQuantizedFuncPrefix)) {
        return std::nullopt;  // `call_op` is not a quantized function call.
      }
    
      absl::StatusOr<Method> method = GetQuantizationMethod(call_op);
      if (!method.ok()) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/lite/stablehlo/transforms/legalize_hlo_conversions/custom_call.cc

      }
    
      rewriter.replaceOp(mhlo_custom_call, tfl_custom);
      return success();
    }
    
    std::optional<bool> IsCustomCallLegal(mhlo::CustomCallOp op) {
      if (op.getCallTargetName().starts_with("custom_call.")) {
        auto bc = op.getBackendConfig();
        if (!bc || mlir::isa<mlir::StringAttr>(*bc)) {
          return false;
        }
      }
    
      return true;
    }
    
    }  // namespace odml
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/transforms/prepare_composite_functions_tf.cc

      StringRef api_name = attr.getName().getLeafReference().getValue();
      bool enable_fuse_tftext =
          tfl_fuse_tftext_ || IsTFTextRegistered(tensorflow::OpRegistry::Global());
      if (api_name.starts_with(kTFTextAPIPrefix) && enable_fuse_tftext) {
        if (failed(ConvertTFTextAPI(func, api_name, attr))) {
          return signalPassFailure();
        }
      } else if (api_name == kCustomSSDPostprocessing) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/strip_saved_module_metadata.cc

              StripSavedModuleMetadataPass> {
      void runOnOperation() override;
    };
    
    bool ShouldStripAttr(NamedAttribute &namedAttr) {
      auto name = namedAttr.getName().strref();
      return name.starts_with("tf_saved_model.");
    }
    
    void StripModule(Operation *module) {
      auto stripAttrs = llvm::to_vector<4>(llvm::make_filter_range(
          module->getAttrs(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 08:06:04 UTC 2023
    - 3.4K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

        if (attr_name.starts_with("tf_saved_model.")) {
          func->removeAttr(attr_name);
        }
      }
    
      auto iface = cast<FunctionOpInterface>(func.getOperation());
      for (int i = 0; i < func.getNumArguments(); ++i) {
        for (auto& attr : iface.getArgAttrs(i)) {
          const StringAttr& attr_name = attr.getName();
          if (attr_name.getValue().starts_with("tf_saved_model.")) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/quantization/tensorflow/cc/quantization_unit_loc.cc

      if (!mlir::isa<NameLoc>(callsite_loc.getCaller())) return false;
      StringRef caller_name =
          mlir::cast<NameLoc>(callsite_loc.getCaller()).getName().strref();
      return caller_name.starts_with(kQuantizationUnitPrefix) &&
             caller_name.ends_with(kQuantizationUnitSuffix);
    }
    
    std::optional<QuantizationUnitLoc::QuantizationUnit>
    FindQuantizationUnitFromLoc(Location loc) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 4.2K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_inline_tpu_island.cc

      if (!nested_module) return;
    
      InlinerInterface inliner(&getContext());
      auto walk_result = getOperation().walk([&](TF::PartitionedCallOp call_op) {
        if (!call_op.getF().getRootReference().getValue().starts_with(
                kNestedModule))
          return WalkResult::advance();
        // This is a call we need to inline!
        LLVM_DEBUG(llvm::dbgs()
                   << "Found call to inline: " << *call_op.getOperation() << "\n");
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Dec 19 08:06:04 UTC 2023
    - 4K bytes
    - Viewed (0)
Back to top