- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 13 for add_attrs (0.12 sec)
-
src/log/slog/record_test.go
r1 := NewRecord(time.Time{}, 0, "", 0) r1.AddAttrs(intAttrs(0, nAttrsInline+1)...) // Ensure that r1.back's capacity exceeds its length. b := make([]Attr, len(r1.back), len(r1.back)+1) copy(b, r1.back) r1.back = b // Make a copy that shares state. r2 := r1 // Adding to both should insert a special Attr in the second. r1AttrsBefore := attrsSlice(r1) r1.AddAttrs(Int("p", 0)) r2.AddAttrs(Int("p", 1))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 15:10:55 UTC 2023 - 4K bytes - Viewed (0) -
src/log/slog/text_handler_test.go
testenv.SkipIfOptimizationOff(t) r := NewRecord(time.Now(), LevelInfo, "msg", 0) for i := 0; i < 10; i++ { r.AddAttrs(Int("x = y", i)) } var h Handler = NewTextHandler(io.Discard, nil) wantAllocs(t, 0, func() { h.Handle(context.Background(), r) }) h = h.WithGroup("s") r.AddAttrs(Group("g", Int("a", 1))) wantAllocs(t, 0, func() { h.Handle(context.Background(), r) }) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 22 19:05:59 UTC 2023 - 3.8K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args_test.cc
func::FuncOp main_func_op = GetMainFuncOp(*module_op); DictionaryAttr arg_attrs = main_func_op.getArgAttrDict(/*index=*/0); EXPECT_THAT(arg_attrs.get("tf_saved_model.bound_input"), IsNull()); const ArrayRef<Attribute> index_path_attrs = mlir::cast<ArrayAttr>(arg_attrs.get("tf_saved_model.index_path")) .getValue(); EXPECT_THAT(index_path_attrs, SizeIs(1));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 6.2K bytes - Viewed (0) -
src/log/slog/record.go
for i := 0; i < r.nFront; i++ { if !f(r.front[i]) { return } } for _, a := range r.back { if !f(a) { return } } } // AddAttrs appends the given Attrs to the [Record]'s list of Attrs. // It omits empty groups. func (r *Record) AddAttrs(attrs ...Attr) { var i int for i = 0; i < len(attrs) && r.nFront < len(r.front); i++ { a := attrs[i] if a.Value.isEmptyGroup() { continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 08 16:30:56 UTC 2023 - 6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/cc/convert_asset_args.cc
// Given argument attributes `arg_attrs`, returns a new set of argument // attributes where the "tf_saved_model.bound_input" attribute has been replaced // with the "tf_saved_model.index_path" attribute. `index_path` is the element // of the index path attribute. SmallVector<NamedAttribute> ReplaceBoundInputAttrWithIndexPathAttr( const ArrayRef<NamedAttribute> arg_attrs, const StringRef index_path, Builder& builder) {
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Apr 25 16:01:03 UTC 2024 - 5.4K bytes - Viewed (0) -
src/net/addrselect.go
addrs []IPAddr // addrs to sort addrAttr []ipAttr srcs []netip.Addr // or not valid addr if unreachable srcAttr []ipAttr } func (s *byRFC6724) Len() int { return len(s.addrs) } func (s *byRFC6724) Swap(i, j int) { s.addrs[i], s.addrs[j] = s.addrs[j], s.addrs[i] s.srcs[i], s.srcs[j] = s.srcs[j], s.srcs[i] s.addrAttr[i], s.addrAttr[j] = s.addrAttr[j], s.addrAttr[i]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 09 00:24:06 UTC 2024 - 9.7K bytes - Viewed (0) -
src/log/slog/internal/benchmarks/handlers_test.go
import ( "bytes" "context" "log/slog" "slices" "testing" ) func TestHandlers(t *testing.T) { ctx := context.Background() r := slog.NewRecord(testTime, slog.LevelInfo, testMessage, 0) r.AddAttrs(testAttrs...) t.Run("text", func(t *testing.T) { var b bytes.Buffer h := newFastTextHandler(&b) if err := h.Handle(ctx, r); err != nil { t.Fatal(err) } got := b.String() if got != wantText {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 17 23:34:11 UTC 2023 - 1.1K bytes - Viewed (0) -
tensorflow/c/eager/immediate_execution_operation.h
// Set stack trace to be used for potential async error reporting. virtual void SetStackTrace(ManagedStackTrace stack_trace) = 0; virtual const tensorflow::AbstractOpAttrs* GetOpAttrs() const = 0; virtual void AddAttrs(const AbstractOpAttrs* op_attrs) = 0; virtual void SetCancellationManager( CancellationManager* cancellation_manager) = 0; // Returns the stack trace set by `SetStackTrace` if exists.
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Mon Sep 26 22:40:32 UTC 2022 - 3.6K bytes - Viewed (0) -
tensorflow/compiler/mlir/quantization/tensorflow/passes/insert_restore_op.cc
const auto file_prefix_attr = builder.getStringAttr(kTfFilePrefix); const auto arg_attrs = builder.getDictionaryAttr({builder.getNamedAttr( kTfSavedModelIndexPathAttr, builder.getArrayAttr({file_prefix_attr}))}); const int insert_idx = func_op.getNumArguments(); func_op.insertArgument(insert_idx, /*argType=*/filename_op_type, arg_attrs, NameLoc::get(file_prefix_attr));
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Sun Mar 12 06:02:20 UTC 2023 - 9K bytes - Viewed (0) -
tensorflow/compiler/jit/force_xla_constants_on_host_pass.cc
flr, function, &fbody, &constant_arg_indices, &resource_arg_indices)); VLOG(3) << "Found constant arg indices: " << absl::StrJoin(constant_arg_indices, ", "); node->AddAttr("_input_hostmem", constant_arg_indices); } } return absl::OkStatus(); }
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Thu Feb 22 08:47:20 UTC 2024 - 2.1K bytes - Viewed (0)