Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 73 for var_ (0.04 sec)

  1. tensorflow/compiler/jit/variable_info.cc

    VariableInfo::VariableInfo(
        int index, absl::string_view name, Var* var,
        const std::optional<ManagedStackTrace>& definition_stack_trace)
        : index_(index),
          name_(name),
          var_(var),
          definition_stack_trace_(definition_stack_trace) {}
    
    VariableInfo::VariableInfo(VariableInfo&& other)
        : index_(other.index_),
          var_(other.var_),
          definition_stack_trace_(other.definition_stack_trace_),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Wed Sep 06 19:12:29 UTC 2023
    - 2.2K bytes
    - Viewed (0)
  2. tensorflow/compiler/mlir/tfr/python/test_utils.py

          grads = gt.gradient(y, vars_)  # uses registered gradient function.
    
        # compute with composition
        with backprop.GradientTape() as gt:
          for var_ in vars_:
            gt.watch(var_)
          re_y = compute_composite(**kwargs)  # uses composite function.
          re_grads = gt.gradient(re_y, vars_)  # uses gradients compposite function.
    
        for v, re_v in zip(y, re_y):
          self.assertAllClose(v, re_v)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Jun 02 18:32:17 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssagen/phi.go

    					v.AddArg(w)
    					continue
    				}
    			}
    
    			if _, ok := s.varnum[var_]; ok {
    				continue
    			}
    			s.varnum[var_] = int32(len(vartypes))
    			if debugPhi {
    				fmt.Printf("var%d = %v\n", len(vartypes), var_)
    			}
    			vars = append(vars, var_)
    			vartypes = append(vartypes, v.Type)
    		}
    	}
    
    	if len(vartypes) == 0 {
    		return
    	}
    
    	// Find all definitions of the variables we need to process.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 18 17:59:44 UTC 2022
    - 15.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/complit.go

    		}
    		appendWalkStmt(init, ir.NewAssignStmt(base.Pos, var_, r))
    
    		var_ = ir.NewStarExpr(base.Pos, var_)
    		var_ = typecheck.AssignExpr(var_)
    		anylit(n.X, var_, init)
    
    	case ir.OSTRUCTLIT, ir.OARRAYLIT:
    		n := n.(*ir.CompLitExpr)
    		if !t.IsStruct() && !t.IsArray() {
    			base.Fatalf("anylit: not struct/array")
    		}
    
    		if isSimpleName(var_) && len(n.List) > 4 {
    			// lay out static data
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 08 19:03:54 UTC 2023
    - 19.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/jit/variable_info.h

      int index() const { return index_; }
    
      // A pointer to the resource variable.  May be null if this VariableInfo is
      // "empty", i.e. it does not track a resource variable.
      Var* var() const { return var_; }
    
      // Returns the variable name.
      absl::string_view name() const { return name_; }
    
      // Returns true if the resource variable lock was successfully acquired by
      // this thread.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Tue Feb 14 21:57:02 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  6. tensorflow/compiler/aot/codegen.cc

      const {{TYPE}}& var_{{NAME}}({{DIM_VARS}}) const {
        return (*static_cast<const {{TYPE}}(*){{DIM_SIZES}}>(
            arg_data({{I}}))){{INDICES}};
      }
      int var_{{NAME}}_size() const {
        return {{COUNT}} * sizeof({{TYPE}});
      }
      int var_{{NAME}}_count() const {
        return {{COUNT}};
      }
    )";
        const tf2xla::Variable& var = config.variable(i - config.feed_size());
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 01:20:01 UTC 2024
    - 36.8K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/assign.go

    	}
    	n.Rhs = []ir.Node{call}
    	n.SetOp(ir.OAS2FUNC)
    
    	// don't generate a = *var if a is _
    	if ir.IsBlank(a) {
    		return walkExpr(typecheck.Stmt(n), init)
    	}
    
    	var_ := typecheck.TempAt(base.Pos, ir.CurFunc, types.NewPtr(t.Elem()))
    	var_.SetTypecheck(1)
    	var_.MarkNonNil() // mapaccess always returns a non-nil pointer
    
    	n.Lhs[0] = var_
    	init.Append(walkExpr(n, init))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/subst.go

    		}
    	}
    	return t
    }
    
    func (subst *subster) varList(in []*Var) (out []*Var, copied bool) {
    	out = in
    	for i, v := range in {
    		if w := subst.var_(v); w != v {
    			if !copied {
    				// first variable that got substituted => allocate new out slice
    				// and copy all variables
    				new := make([]*Var, len(in))
    				copy(new, out)
    				out = new
    				copied = true
    			}
    			out[i] = w
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11K bytes
    - Viewed (0)
  9. src/go/types/subst.go

    		}
    	}
    	return t
    }
    
    func (subst *subster) varList(in []*Var) (out []*Var, copied bool) {
    	out = in
    	for i, v := range in {
    		if w := subst.var_(v); w != v {
    			if !copied {
    				// first variable that got substituted => allocate new out slice
    				// and copy all variables
    				new := make([]*Var, len(in))
    				copy(new, out)
    				out = new
    				copied = true
    			}
    			out[i] = w
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  10. tensorflow/compiler/jit/build_xla_ops_pass_test.cc

      call->set_requested_device(kXlaDeviceName);
      call->AddAttr(kXlaHasReferenceVarsAttr, false);
    
      auto var =
          ops::VarHandleOp(root.WithOpName("var"), DT_INT32, TensorShape({}));
      auto int32_on_device =
          ops::ReadVariableOp(root.WithOpName("int32_on_device"), var, DT_INT32);
    
      root.graph()->AddEdge(int32_on_device.node(), 0, call, 0);
    
      std::unique_ptr<Graph> graph;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Feb 22 08:47:20 UTC 2024
    - 12.2K bytes
    - Viewed (0)
Back to top