Documentation
¶
Index ¶
- Constants
- Variables
- func CVMVersion(config *params.ChainConfig, num *big.Int) int
- func RLPHashString(x interface{}) string
- func ReadData(r *inference.NpyReader) ([]byte, error)
- type Config
- type Synapse
- func (s *Synapse) Available(entry common.StorageEntry, cvmNetworkID int64) error
- func (s *Synapse) Close()
- func (s *Synapse) Download(info common.StorageEntry) error
- func (s *Synapse) GetGasByInfoHashWithSize(model common.StorageEntry, cvmNetworkID int64) (gas uint64, err error)
- func (s *Synapse) InferByInfoHashWithSize(model, input common.StorageEntry, cvmVersion int, cvmNetworkID int64) ([]byte, error)
- func (s *Synapse) InferByInputContentWithSize(model common.StorageEntry, inputContent []byte, cvmVersion int, ...) ([]byte, error)
Constants ¶
View Source
const ( DATA_PATH string = "/data" SYMBOL_PATH string = "/data/symbol" PARAM_PATH string = "/data/params" )
View Source
const ( PLUGIN_PATH string = "plugins/" PLUGIN_POST_FIX string = "libcvm_runtime.so" MinMemoryUsage int64 = 2 * 1024 * 1024 * 1024 ReservedMemoryUsage int64 = 512 * 1024 * 1024 )
Variables ¶
View Source
var ( KERNEL_RUNTIME_ERROR = errors.New("cvm kernel runtime error") KERNEL_LOGIC_ERROR = errors.New("cvm kernel logic error") )
View Source
var CvmDolFixTorrHashes = map[string]string{
"31f75c90e8fe1c5b16cbdc466dc6127487a92add": "c816d85a023abacb687080ca57f580d4999b8b1d",
}
View Source
var CvmFixHashes = map[string][]byte{ "0x53f8e0b0c93dedff2706e28643804470d67d79a9f1447b75dab09304ed8d1fe0": []byte{19, 52, 238, 252, 208, 237, 223, 227, 243, 91}, "0xe0c42bc0779d627e14fba7c4e6f355644aa2535dfe9786d64684fb05f1de615c": []byte{6, 252, 4, 59, 242, 0, 247, 30, 224, 217}, }
Functions ¶
func CVMVersion ¶ added in v1.10.7
func CVMVersion(config *params.ChainConfig, num *big.Int) int
func RLPHashString ¶ added in v1.0.0
func RLPHashString(x interface{}) string
Types ¶
type Config ¶
type Config struct { // StorageDir string `toml:",omitempty"` IsNotCache bool `toml:",omitempty"` DeviceType string `toml:",omitempty"` DeviceId int `toml:",omitempty"` IsRemoteInfer bool `toml:",omitempty"` InferURI string `toml:",omitempty"` Debug bool `toml:",omitempty"` MaxMemoryUsage int64 Storagefs torrentfs.CortexStorage }
type Synapse ¶
type Synapse struct {
// contains filtered or unexported fields
}
func (*Synapse) Available ¶ added in v1.9.51
func (s *Synapse) Available(entry common.StorageEntry, cvmNetworkID int64) error
func (*Synapse) Download ¶ added in v1.10.7
func (s *Synapse) Download(info common.StorageEntry) error
Download is used to control the torrentfs, not for remote invoked now
func (*Synapse) GetGasByInfoHashWithSize ¶ added in v1.10.8
func (*Synapse) InferByInfoHashWithSize ¶ added in v1.10.8
func (*Synapse) InferByInputContentWithSize ¶ added in v1.10.8
Click to show internal directories.
Click to hide internal directories.