Documentation ¶
Index ¶
- Constants
- Variables
- func RLPHashString(x interface{}) string
- func ReadData(r *inference.NpyReader) ([]byte, error)
- type Config
- type Synapse
- func (s *Synapse) Available(infoHash string, rawSize int64) error
- func (s *Synapse) Close()
- func (s *Synapse) GetGasByInfoHash(modelInfoHash string) (gas uint64, err error)
- func (s *Synapse) InferByInfoHash(modelInfoHash, inputInfoHash string) ([]byte, error)
- func (s *Synapse) InferByInputContent(modelInfoHash string, inputContent []byte) ([]byte, error)
Constants ¶
View Source
const ( DATA_PATH string = "/data" SYMBOL_PATH string = "/data/symbol" PARAM_PATH string = "/data/params" )
View Source
const MinMemoryUsage int64 = 2 * 1024 * 1024 * 1024
View Source
const PLUGIN_PATH string = "plugins/"
View Source
const PLUGIN_POST_FIX string = "_cvm.so"
View Source
const ReservedMemoryUsage int64 = 512 * 1024 * 1024
Variables ¶
View Source
var ( KERNEL_RUNTIME_ERROR = errors.New("Kernel runtime error") KERNEL_LOGIC_ERROR = errors.New("Kernel logic error") )
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 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.CVMStorage }
type Synapse ¶
type Synapse struct {
// contains filtered or unexported fields
}
func (*Synapse) GetGasByInfoHash ¶ added in v1.0.0
func (*Synapse) InferByInfoHash ¶
Click to show internal directories.
Click to hide internal directories.