Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for getLoadedDialect (0.21 sec)

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

        default_device_ = std::string(default_device);
      }
    
      void runOnOperation() override {
        Builder builder(&getContext());
        Dialect* tf = getContext().getLoadedDialect<TensorFlowDialect>();
        getOperation().walk([&](Operation* op) {
          if (auto device_attr = op->getAttrOfType<StringAttr>(kDeviceAttr)) {
            // We assign default device to ops with device attribute that is empty.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4.3K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/device_attribute_to_launch.cc

      op->removeAttr(StringAttr::get(context, kDeviceAttr));
      op->moveBefore(return_op);
    }
    
    void DeviceAttributeToLaunch::runOnOperation() {
      const Dialect* tf_dialect = getContext().getLoadedDialect("tf");
    
      getOperation().walk([&](Operation* op) {
        if (op->getDialect() != tf_dialect) return WalkResult::advance();
        if (auto device = op->getAttrOfType<StringAttr>(kDeviceAttr)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Oct 04 00:59:46 UTC 2022
    - 2.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/replica_id_to_device_ordinal.cc

              op->hasAttr(kDeviceOrdinalAttr) && op->hasAttr(kReplicaIdAttr));
    }
    
    void ReplicaIDToDeviceOrdinalPass::runOnOperation() {
      const Dialect* tf_dialect = getContext().getLoadedDialect("tf");
      if (!tf_dialect) {
        getOperation().emitError() << "'tf' dialect is not registered";
        return signalPassFailure();
      }
    
      // Get the number of devices per host.
      int device_num = 0;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/launch_to_device_attribute.cc

          body.end());
    
      launch.erase();
    
      return success();
    }
    
    void LaunchToDeviceAttributePass::runOnOperation() {
      const Dialect* tf_dialect = getContext().getLoadedDialect("tf");
      if (!tf_dialect) {
        getOperation().emitError() << "'tf' dialect is not registered";
        return signalPassFailure();
      }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tfr/passes/canonicalize.cc

    }  // namespace
    
    void populateCanonicalizationPatterns(func::FuncOp func,
                                          RewritePatternSet &patterns) {
      MLIRContext *context = func.getContext();
      mlir::Dialect *tf = context->getLoadedDialect<mlir::TF::TensorFlowDialect>();
      // Load all official canonicalization patterns. Here we skip the
      // canonicalization of the ops in the tf dialect, because they couldn't
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Sat Jan 14 22:15:06 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/lite/quantization/tensorflow/fallback_to_flex_ops.cc

      RewritePatternSet patterns(ctx);
      populateWithGenerated(patterns);
      (void)applyPatternsAndFoldGreedily(func, std::move(patterns));
    
      // Convert unsupported ops to Flex ops.
      auto tf_dialect = ctx->getLoadedDialect<TF::TensorFlowDialect>();
      func.walk([&](Operation *op) {
        if (op->getDialect() != tf_dialect) return;
        if (IsAllowListedOp(op)) return;
        if (op->hasAttr(kNoFallbackAttr)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/translate/export_graphdef.cc

      FunctionLibraryDefinition temp_flib_def(OpRegistry::Global(),
                                              FunctionDefLibrary());
      llvm::SmallDenseSet<FuncOp> visited_functions;
      auto tf_dialect = module.getContext()->getLoadedDialect("tf");
      // Construct SymbolTable to enable cheap function lookups. The cost
      // of constructing the table is offset by the number of queries.
      SymbolTable symbol_table(module);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed May 01 11:17:36 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tf2xla/api/v2/tf_executor_to_graph.cc

      FunctionLibraryDefinition temp_flib_def(OpRegistry::Global(),
                                              FunctionDefLibrary());
      llvm::SmallDenseSet<FuncOp> visited_functions;
      auto tf_dialect = module.getContext()->getLoadedDialect("tf");
      // Construct SymbolTable to enable cheap function lookups. The cost
      // of constructing the table is offset by the number of queries.
      SymbolTable symbol_table(module);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Jun 06 23:04:51 UTC 2024
    - 35.2K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/replicate_to_island.cc

          }
        }
      }
    
      island_op.erase();
      return success();
    }
    
    void ReplicateToIslandPass::runOnOperation() {
      const Dialect* tf_dialect = getContext().getLoadedDialect("tf");
      if (!tf_dialect) {
        getOperation().emitError() << "'tf' dialect is not registered";
        return signalPassFailure();
      }
    
      // Find islands with a single `tf_device.replicate` and create individual
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Mon Jul 24 21:01:40 UTC 2023
    - 16.9K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tf2xla/internal/passes/mark_ops_for_outside_compilation.cc

                  << " outside compilation regions.";
      }
    }
    
    void MarkOpsForOutsideCompilation::runOnOperation() {
      auto module = getOperation();
      const Dialect* tf_dialect = getContext().getLoadedDialect("tf");
      if (!tf_dialect) {
        getOperation().emitError() << "'tf' dialect is not registered";
        return signalPassFailure();
      }
      RewritePatternSet patterns(&getContext());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 21.4K bytes
    - Viewed (0)
Back to top