<#CP2HDHKE1|flyte-v1-support> hi team, i managed t...
# flyte-on-gcp
l
#flyte-v1-support hi team, i managed to setup a simple cluster on GKE . Now I want to check how workflows spin off GPUs and modified the hello_world example as follows :
Copy code
from flytekit import task, workflow, Resources


@task(requests=Resources(cpu="1", gpu="1", mem="1Gi"),
	  container_image="ghcr.io/flyteorg/flytecookbook:kfpytorch-latest",)
def say_hello() -> str:
    return "Hello, World!"

@workflow
def hello_world_wf_gpu() -> str:
    res = say_hello()
    return res

if __name__ == "__main__":
    print(f"Running my_wf() {hello_world_wf_gpu()}")
When I run this workflow, I get the follow error . Any idea how to fix this ?
i guess need to specify the GPU type as documented here : https://cloud.google.com/kubernetes-engine/docs/how-to/autopilot-gpus#request-gpus
Copy code
spec:
  nodeSelector:
    cloud.google.com/gke-accelerator: GPU_TYPE
How to specify/pass this from the Task config ?
t
l
Thanks, but how we specify which GPU instance to use ? (vidia-tesla-t4,nvidia-tesla-a100 nvidia-a100-80gb) its not mentioned in the document
t
This is currently being worked on. Please refer to this discussion: https://github.com/flyteorg/flyte/discussions/3796. cc @thankful-minister-83577
l
thank you, let me look into this