Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 174 for SetAttr (0.38 sec)

  1. tensorflow/compiler/mlir/lite/experimental/tac/transforms/target_annotation.cc

                       OpBuilder* builder) {
      // TODO(karimnosseir): Maybe set device capabilities to allow us to have
      // more flexbility when raise the subgraphs.
      auto default_target = builder->getStringAttr(annotation);
      op->setAttr(attribute, default_target);
    }
    
    void TargetAnnotationPass::SetTargetAnnotation(
        Operation* op, llvm::ArrayRef<std::string> device_specs,
        OpBuilder* builder) {
      if (op->hasAttr(kSkipTargetAnnotation)) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri May 19 19:32:06 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tensorflow/transforms/gpu_fusion.cc

        if (!add_op || add_op.getZ().hasOneUse()) {
          // We fuse the Relu only if the add has a single use, otherwise we only
          // fuse the add itself.
          op->setAttr("activation_mode", rewriter.getStringAttr("Relu"));
          rewriter.replaceOp(relu_op, op->getResult(0));
        }
        if (add_op) {
          rewriter.replaceOp(add_op, op->getResult(0));
        }
    
        return success();
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Nov 03 12:35:38 UTC 2022
    - 5.2K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/lite/utils/perception_ops_utils_test.cc

          mlir::NameLoc::get(builder->getStringAttr("fused_func")), "fused_func",
          func_type, {});
    
      func.addEntryBlock();
      mlir::StringAttr attr_value = builder->getStringAttr("MaxUnpooling2D");
      func->setAttr("tf._implements", attr_value);
      return func;
    }
    
    func::FuncOp createMaxUnpoolingFunc(
        mlir::Builder* builder, const SmallVector<int64_t, 4>& input_shape,
        const SmallVector<int64_t, 4>& output_shape) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Sep 29 21:02:21 UTC 2022
    - 7.4K bytes
    - Viewed (0)
  4. tensorflow/compiler/mlir/tensorflow/transforms/group_by_dialect.cc

      auto func = builder.create<mlir::func::FuncOp>(
          ops[0]->getLoc(), dialect.str() + std::to_string(function_id),
          builder.getFunctionType(input_types, output_types));
      func->setAttr("dialect", builder.getStringAttr(dialect));
      auto block = func.addEntryBlock();
    
      llvm::DenseSet<Operation*> all_operations;
      for (Operation* outer : ops) {
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 17 07:31:01 UTC 2023
    - 8K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_main_function.cc

          {StringAttr::get(context, "outputs"),
           StringAttr::get(context, absl::StrJoin(output_names, ","))});
      auto dictAttr = DictionaryAttr::get(context, func_attrs);
      main_func->setAttr(StringAttr::get(context, kEntryFunctionAttr), dictAttr);
      main_func->setAttr(
          kTfSavedModelExportedNamesAttr,
          builder.getStrArrayAttr({kImportModelDefaultGraphFuncName}));
    
      if (input_names.size() != main_func.getNumArguments() ||
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 16.5K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/quantization/stablehlo/passes/insert_calibration_statistics_saver.cc

      OpBuilder builder(&ctx);
      module_op.walk([&builder](Operation* op) {
        if (op->hasAttrOfType<BoolAttr>("is_stateless") &&
            ContainCalibrationStatisticsSaverOp(op)) {
          op->setAttr("is_stateless", builder.getBoolAttr(false));
        }
      });
    }
    
    std::unique_ptr<OperationPass<ModuleOp>>
    CreateInsertCalibrationStatisticsSaverPass(
        StringRef calibration_data_dir,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue May 14 06:31:57 UTC 2024
    - 7.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/set_tpu_infeed_layout.cc

        // Do not append a UnitAttr for the "token" operand here to avoid
        // compilation failure when exporting the "layouts" attribute to a graph
        // node. Instead, add the UnitAttr during LegalizeTF pass.
        op->setAttr("layouts", layout.value());
    
        return mlir::WalkResult::advance();
      });
      return !res.wasInterrupted();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  8. 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();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Apr 30 02:01:13 UTC 2024
    - 28.9K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/tensorflow/transforms/tpu_update_embedding_enqueue_op_inputs.cc

                mode_string_value));
    
        auto outside_compilation_attr =
            embedding_op->getAttrOfType<StringAttr>(kXlaOutsideCompilationAttr);
        if (outside_compilation_attr)
          enqueue_mode->setAttr(kXlaOutsideCompilationAttr,
                                outside_compilation_attr);
    
        mode_enqueue_operand.set(enqueue_mode);
      }
    
      return success();
    }
    
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Oct 05 23:50:19 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/quantization/stablehlo/passes/prepare_quantize.cc

        if (!preceding_qcast) return failure();
    
        auto new_qcast = rewriter.create<quantfork::QuantizeCastOp>(
            q_op.getLoc(), q_op.getType(), preceding_qcast.getArg());
        new_qcast->setAttr(kVolatileOpAttrName, rewriter.getUnitAttr());
        q_op->replaceAllUsesWith(new_qcast);
        return success();
      }
    };
    
    class ConvertTFConstOpToArithConstOp : public OpRewritePattern<TF::ConstOp> {
     public:
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Apr 03 05:11:03 UTC 2024
    - 8.1K bytes
    - Viewed (0)
Back to top