mirror of
https://github.com/huggingface/text-generation-inference.git
synced 2025-09-11 04:14:52 +00:00
Checking our device.
This commit is contained in:
parent
e1867079fd
commit
e28b5bf460
@ -30,6 +30,8 @@ class TextGenerationService(generate_pb2_grpc.TextGenerationServiceServicer):
|
||||
return self.model.info
|
||||
|
||||
async def Health(self, request, context):
|
||||
if self.model.device.type == "cuda":
|
||||
torch.zeros((2, 2)).to(device=f"cuda:{os.environ['RANK']}")
|
||||
return generate_pb2.HealthResponse()
|
||||
|
||||
async def ServiceDiscovery(self, request, context):
|
||||
|
Loading…
Reference in New Issue
Block a user