MCPcopy Create free account
hub / github.com/pytorch/pytorch / _Workspace_fetch_int8_blob

Function _Workspace_fetch_int8_blob

caffe2/python/workspace.py:445–460  ·  view source on GitHub ↗

Fetches an Int8 blob from the workspace. It shared backend implementation with FetchBlob but it is recommended when fetching Int8 Blobs Inputs: name: the name of the Int8 blob - a string or a BlobReference Returns: data: int8 numpy array, data scale: float, fake quanti

(ws, name)

Source from the content-addressed store, hash-verified

443 _Workspace_remove_blob(ws, name)
444
445def _Workspace_fetch_int8_blob(ws, name):
446 """Fetches an Int8 blob from the workspace. It shared backend implementation
447 with FetchBlob but it is recommended when fetching Int8 Blobs
448
449 Inputs:
450 name: the name of the Int8 blob - a string or a BlobReference
451 Returns:
452 data: int8 numpy array, data
453 scale: float, fake quantization scale
454 zero_point: int, fake quantization offset
455 """
456 result = ws.fetch_blob(name)
457 assert isinstance(result, tuple), \
458 'You are not fetching an Int8Blob {}. Please use fetch_blob'.format(
459 StringifyBlobName(name))
460 return Int8Tensor(*result)
461
462
463C.Workspace.fetch_int8_blob = _Workspace_fetch_int8_blob

Callers

nothing calls this directly

Calls 3

isinstanceFunction · 0.85
StringifyBlobNameFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…