MCPcopy Create free account
hub / github.com/Oneflow-Inc/oneflow / ToBool

Method ToBool

oneflow/api/cpp/framework/ivalue.cpp:38–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36}
37
38bool IValue::ToBool() const {
39 CHECK_EQ(tag_, Tag::kBool) << "Current value is not a bool.";
40 return payload_.i.v_bool;
41}
42
43const Tensor& IValue::ToTensor() const {
44 CHECK_EQ(tag_, Tag::kTensor) << "Current value is not a tensor.";

Callers 1

TESTFunction · 0.80

Calls

no outgoing calls

Tested by 1

TESTFunction · 0.64