From 287b28702b15369a4b6ae29ab585e73dad841b33 Mon Sep 17 00:00:00 2001 From: Charles Frye Date: Thu, 19 Dec 2024 20:58:48 -0500 Subject: [PATCH 1/2] speed up blender with L40S --- 06_gpu_and_ml/blender/blender_video.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/06_gpu_and_ml/blender/blender_video.py b/06_gpu_and_ml/blender/blender_video.py index 0c21ba63b..54dc74eaa 100644 --- a/06_gpu_and_ml/blender/blender_video.py +++ b/06_gpu_and_ml/blender/blender_video.py @@ -61,7 +61,7 @@ @app.function( - gpu="A10G" if WITH_GPU else None, + gpu="L40S" if WITH_GPU else None, # default limits on Modal free tier concurrency_limit=10 if WITH_GPU else 100, image=rendering_image, @@ -174,8 +174,8 @@ def combine(frames_bytes: list[bytes], fps: int = FPS) -> bytes: # The bytes for the video come back to our local machine, and we write them to a file. -# The whole rendering process (for 4 seconds of 1080p 60 FPS video) takes about five minutes to run on 10 A10G GPUs, -# with a per-frame latency of about 10 seconds, and about five minutes to run on 100 CPUs, with a per-frame latency of about one minute. +# The whole rendering process (for four seconds of 1080p 60 FPS video) takes about three minutes to run on 10 L40S GPUs, +# with a per-frame latency of about six seconds, and about five minutes to run on 100 CPUs, with a per-frame latency of about one minute. @app.local_entrypoint() From 8248629240ed3eddad1b0a2f1cdafff29bc32164 Mon Sep 17 00:00:00 2001 From: Charles Frye Date: Thu, 19 Dec 2024 21:03:59 -0500 Subject: [PATCH 2/2] more than 10x --- 06_gpu_and_ml/blender/blender_video.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06_gpu_and_ml/blender/blender_video.py b/06_gpu_and_ml/blender/blender_video.py index 54dc74eaa..4d87fcde0 100644 --- a/06_gpu_and_ml/blender/blender_video.py +++ b/06_gpu_and_ml/blender/blender_video.py @@ -9,7 +9,7 @@ # You can run it on CPUs to scale out on one hundred containers # or run it on GPUs to get higher throughput per node. -# Even for this simple scene, GPUs render 10x faster than CPUs. +# Even for this simple scene, GPUs render >10x faster than CPUs. # The final render looks something like this: