(self, weight_dict)
| 23 | self.create_cuda_buffer = create_cuda_buffer |
| 24 | self.create_cpu_buffer = create_cpu_buffer |
| 25 | self.infer_dtype = GET_DTYPE() |
| 26 | self.sensitive_layer_dtype = GET_SENSITIVE_DTYPE() |
| 27 | |
| 28 | def describe_storage(self, metadata): |
| 29 | source = metadata[self.tensor_name] |
| 30 | return StorageDescription((WeightStorage(self.tensor_name, "tensor", source.shape, source.loaded_dtype or source.dtype),)) |
| 31 | |
| 32 | def load(self, weight_dict): |
| 33 | if isinstance(weight_dict, BlockLoadContext): |
| 34 | attr = "tensor_cuda_buffer" if self.create_cuda_buffer else "pin_tensor" |
nothing calls this directly
no test coverage detected