more information about GPU.
Browse files
app.py
CHANGED
|
@@ -10,6 +10,7 @@ from rayt.scene import random_scene
|
|
| 10 |
from rayt.cuda_renderer import render_with_cuda
|
| 11 |
from rayt.numba_renderer import render_with_numba
|
| 12 |
from rayt.rust_renderer import render_with_rust
|
|
|
|
| 13 |
import gradio as gr
|
| 14 |
|
| 15 |
IS_CUDA_AVAILABE, _ = is_cuda_available()
|
|
@@ -76,16 +77,31 @@ with gr.Blocks() as iface:
|
|
| 76 |
)
|
| 77 |
|
| 78 |
if IS_CUDA_AVAILABE:
|
| 79 |
-
|
| 80 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 81 |
)
|
| 82 |
else:
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
|
|
|
|
|
|
| 87 |
)
|
| 88 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
gr.Markdown("## PERFORMANCE")
|
| 90 |
gr.Markdown("RAYT tested on this machine:")
|
| 91 |
gr.Markdown(
|
|
|
|
| 10 |
from rayt.cuda_renderer import render_with_cuda
|
| 11 |
from rayt.numba_renderer import render_with_numba
|
| 12 |
from rayt.rust_renderer import render_with_rust
|
| 13 |
+
from numba import cuda
|
| 14 |
import gradio as gr
|
| 15 |
|
| 16 |
IS_CUDA_AVAILABE, _ = is_cuda_available()
|
|
|
|
| 77 |
)
|
| 78 |
|
| 79 |
if IS_CUDA_AVAILABE:
|
| 80 |
+
device = cuda.get_current_device()
|
| 81 |
+
cc = device.compute_capability
|
| 82 |
+
cuda_info_dataframe = pd.DataFrame(
|
| 83 |
+
{
|
| 84 |
+
"CUDA support": ["AVAILABLE"],
|
| 85 |
+
"Found GPU": [device.name.decode('utf-8')],
|
| 86 |
+
"Compute Capability": [f"{cc[0]}.{cc[1]}"]
|
| 87 |
+
}
|
| 88 |
)
|
| 89 |
else:
|
| 90 |
+
cuda_info_dataframe = pd.DataFrame(
|
| 91 |
+
{
|
| 92 |
+
"CUDA support": ["NOT AVAILABLE"],
|
| 93 |
+
"Found GPU": ["-"],
|
| 94 |
+
"Compute Capability": ["-"]
|
| 95 |
+
}
|
| 96 |
)
|
| 97 |
|
| 98 |
+
gr.DataFrame(cuda_info_dataframe)
|
| 99 |
+
gr.Markdown(
|
| 100 |
+
"If you have an NVIDIA GPU on your local machine, you can clone the project and "
|
| 101 |
+
"run it locally. You can also deploy it to a server with CUDA support for faster "
|
| 102 |
+
"rendering."
|
| 103 |
+
)
|
| 104 |
+
|
| 105 |
gr.Markdown("## PERFORMANCE")
|
| 106 |
gr.Markdown("RAYT tested on this machine:")
|
| 107 |
gr.Markdown(
|