MCPcopy
hub / github.com/deepspeedai/DeepSpeed / validate_torch_version

Method validate_torch_version

op_builder/builder.py:153–161  ·  view source on GitHub ↗
(torch_info)

Source from the content-addressed store, hash-verified

151
152 @staticmethod
153 def validate_torch_version(torch_info):
154 install_torch_version = torch_info['version']
155 current_torch_version = ".".join(torch.__version__.split('.')[:2])
156 if install_torch_version != current_torch_version:
157 raise RuntimeError("PyTorch version mismatch! DeepSpeed ops were compiled and installed "
158 "with a different version than what is being used at runtime. "
159 f"Please re-install DeepSpeed or switch torch versions. "
160 f"Install torch version={install_torch_version}, "
161 f"Runtime torch version={current_torch_version}")
162
163 @staticmethod
164 def validate_torch_op_version(torch_info):

Callers 1

loadMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected