Skip to content

Commit 04e8524

Browse files
committed
Implement Windows executable icon integration, hide terminal window via windows_subsystem attribute, scale window to 980x700 for high-DPI scaling compatibility, and support split Vector/Matrix compute results in GUI
1 parent 1fb024b commit 04e8524

6 files changed

Lines changed: 97 additions & 30 deletions

File tree

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,8 +405,8 @@ if(WIN32)
405405
set(CPACK_NSIS_PACKAGE_NAME "GPUBench")
406406
set(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
407407
set(CPACK_NSIS_MODIFY_PATH ON)
408-
# set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/windows/icon.ico")
409-
# set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/windows/icon.ico")
408+
set(CPACK_NSIS_MUI_ICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/windows/icon.ico")
409+
set(CPACK_NSIS_MUI_UNIICON "${CMAKE_CURRENT_SOURCE_DIR}/packaging/windows/icon.ico")
410410
set(CPACK_NSIS_HELP_LINK "https://github.com/Soddentrough/GPUBench")
411411
set(CPACK_NSIS_URL_INFO_ABOUT "https://github.com/Soddentrough/GPUBench")
412412
set(CPACK_NSIS_CONTACT "https://github.com/Soddentrough/GPUBench/issues")

Cargo.lock

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gpubench-gui/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,5 @@ image = "0.24"
1212
serde = { version = "1.0", features = ["derive"] }
1313
serde_json = "1.0"
1414
rfd = "0.15"
15+
[build-dependencies]
16+
winres = "0.1"

gpubench-gui/build.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
fn main() {
2+
if std::env::var("CARGO_CFG_TARGET_OS").unwrap_or_default() == "windows" {
3+
let mut res = winres::WindowsResource::new();
4+
res.set_icon("../packaging/windows/icon.ico");
5+
if let Err(e) = res.compile() {
6+
eprintln!("Failed to compile Windows resources: {}", e);
7+
}
8+
}
9+
}

gpubench-gui/src/main.rs

Lines changed: 65 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![windows_subsystem = "windows"]
2+
13
use iced::widget::{button, column, container, progress_bar, row, scrollable, text, Space, tooltip};
24
use iced::{color, Background, Border, Command, Element, Length, Theme, executor, Application, Settings};
35
use gpubench_core::{get_available_benchmarks, run_benchmarks, ResultData};
@@ -115,7 +117,7 @@ pub fn main() -> iced::Result {
115117
GPUBenchApp::run(Settings {
116118
antialiasing: true,
117119
window: iced::window::Settings {
118-
size: iced::Size::new(1050.0, 850.0),
120+
size: iced::Size::new(980.0, 700.0),
119121
..Default::default()
120122
},
121123
..Settings::default()
@@ -187,11 +189,16 @@ struct GPUBenchApp {
187189

188190
gpu_fp64: f32,
189191
gpu_fp32: f32,
190-
gpu_fp16: f32,
191-
gpu_bf16: f32,
192-
gpu_fp8: f32,
193-
gpu_int8: f32,
194-
gpu_int4: f32,
192+
gpu_fp16_vector: f32,
193+
gpu_fp16_matrix: f32,
194+
gpu_bf16_vector: f32,
195+
gpu_bf16_matrix: f32,
196+
gpu_fp8_vector: f32,
197+
gpu_fp8_matrix: f32,
198+
gpu_int8_vector: f32,
199+
gpu_int8_matrix: f32,
200+
gpu_int4_vector: f32,
201+
gpu_int4_matrix: f32,
195202

196203
gpu_rt_anyhit: f32,
197204
gpu_rt_as_build: f32,
@@ -269,11 +276,16 @@ impl Application for GPUBenchApp {
269276
sys_mem_lat: 0.0,
270277
gpu_fp64: 0.0,
271278
gpu_fp32: 0.0,
272-
gpu_fp16: 0.0,
273-
gpu_bf16: 0.0,
274-
gpu_fp8: 0.0,
275-
gpu_int8: 0.0,
276-
gpu_int4: 0.0,
279+
gpu_fp16_vector: 0.0,
280+
gpu_fp16_matrix: 0.0,
281+
gpu_bf16_vector: 0.0,
282+
gpu_bf16_matrix: 0.0,
283+
gpu_fp8_vector: 0.0,
284+
gpu_fp8_matrix: 0.0,
285+
gpu_int8_vector: 0.0,
286+
gpu_int8_matrix: 0.0,
287+
gpu_int4_vector: 0.0,
288+
gpu_int4_matrix: 0.0,
277289
gpu_rt_anyhit: 0.0,
278290
gpu_rt_as_build: 0.0,
279291
gpu_rt_incoherent: 0.0,
@@ -506,11 +518,16 @@ impl Application for GPUBenchApp {
506518
"compute": {
507519
"fp64_tflops": self.gpu_fp64,
508520
"fp32_tflops": self.gpu_fp32,
509-
"fp16_tflops": self.gpu_fp16,
510-
"bf16_tflops": self.gpu_bf16,
511-
"fp8_tflops": self.gpu_fp8,
512-
"int8_tops": self.gpu_int8,
513-
"int4_tops": self.gpu_int4,
521+
"fp16_vector_tflops": self.gpu_fp16_vector,
522+
"fp16_matrix_tflops": self.gpu_fp16_matrix,
523+
"bf16_vector_tflops": self.gpu_bf16_vector,
524+
"bf16_matrix_tflops": self.gpu_bf16_matrix,
525+
"fp8_vector_tflops": self.gpu_fp8_vector,
526+
"fp8_matrix_tflops": self.gpu_fp8_matrix,
527+
"int8_vector_tops": self.gpu_int8_vector,
528+
"int8_matrix_tops": self.gpu_int8_matrix,
529+
"int4_vector_tops": self.gpu_int4_vector,
530+
"int4_matrix_tops": self.gpu_int4_matrix,
514531
},
515532
"memory": {
516533
"bandwidth_gbps": self.gpu_bw,
@@ -760,13 +777,18 @@ impl Application for GPUBenchApp {
760777
].spacing(12).into();
761778

762779
let compute_content = column![
763-
metric_row("FP64", "FP64", self.gpu_fp64, "TFLOPS", "Measures double precision (64-bit) floating point operations per second. Crucial for scientific simulations and high-accuracy physics."),
764-
metric_row("FP32", "FP32", self.gpu_fp32, "TFLOPS", "Measures single precision (32-bit) floating point operations per second. The standard metric for generic gaming and graphics compute workloads."),
765-
metric_row("FP16", "FP16", self.gpu_fp16, "TFLOPS", "Measures half precision (16-bit) floating point operations per second. Used extensively in modern rendering, mobile ML, and HDR imaging."),
766-
metric_row("BF16", "BF16", self.gpu_bf16, "TFLOPS", "Measures Brain Float 16 operations per second. Primarily utilized in AI training and deep learning models to retain dynamic range while saving bandwidth."),
767-
metric_row("FP8", "FP8", self.gpu_fp8, "TFLOPS", "Measures quarter precision (8-bit) floating point operations. Used for highly optimized AI inference where memory bandwidth is the primary bottleneck."),
768-
metric_row("INT8", "INT8", self.gpu_int8, "TOPS", "Measures 8-bit integer operations per second. Often used for quantized machine learning inference and specialized hardware-accelerated video processing."),
769-
metric_row("INT4", "INT4", self.gpu_int4, "TOPS", "Measures 4-bit integer operations per second. An extreme quantization format used in ultra-efficient AI processing and specialized lookup tasks."),
780+
metric_row("FP64", "FP64 (Vector)", self.gpu_fp64, "TFLOPS", "Measures double precision (64-bit) floating point operations per second. Crucial for scientific simulations and high-accuracy physics."),
781+
metric_row("FP32", "FP32 (Vector)", self.gpu_fp32, "TFLOPS", "Measures single precision (32-bit) floating point operations per second. The standard metric for generic gaming and graphics compute workloads."),
782+
metric_row("FP16", "FP16 (Vector)", self.gpu_fp16_vector, "TFLOPS", "Measures vector half precision (16-bit) floating point operations per second. Used extensively in modern rendering, mobile ML, and HDR imaging."),
783+
metric_row("FP16", "FP16 (Matrix)", self.gpu_fp16_matrix, "TFLOPS", "Measures hardware-accelerated cooperative matrix half precision (16-bit) operations."),
784+
metric_row("BF16", "BF16 (Vector)", self.gpu_bf16_vector, "TFLOPS", "Measures vector Brain Float 16 operations per second. Primarily utilized in AI training and deep learning models to retain dynamic range while saving bandwidth."),
785+
metric_row("BF16", "BF16 (Matrix)", self.gpu_bf16_matrix, "TFLOPS", "Measures hardware-accelerated cooperative matrix Brain Float 16 operations."),
786+
metric_row("FP8", "FP8 (Vector)", self.gpu_fp8_vector, "TFLOPS", "Measures vector quarter precision (8-bit) floating point operations per second. Used for highly optimized AI inference where memory bandwidth is the primary bottleneck."),
787+
metric_row("FP8", "FP8 (Matrix)", self.gpu_fp8_matrix, "TFLOPS", "Measures hardware-accelerated cooperative matrix quarter precision (8-bit) operations."),
788+
metric_row("INT8", "INT8 (Vector)", self.gpu_int8_vector, "TOPS", "Measures vector 8-bit integer operations per second. Often used for quantized machine learning inference and specialized hardware-accelerated video processing."),
789+
metric_row("INT8", "INT8 (Matrix)", self.gpu_int8_matrix, "TOPS", "Measures hardware-accelerated cooperative matrix 8-bit integer operations."),
790+
metric_row("INT4", "INT4 (Vector)", self.gpu_int4_vector, "TOPS", "Measures vector 4-bit integer operations per second. An extreme quantization format used in ultra-efficient AI processing and specialized lookup tasks."),
791+
metric_row("INT4", "INT4 (Matrix)", self.gpu_int4_matrix, "TOPS", "Measures hardware-accelerated cooperative matrix 4-bit integer operations."),
770792
].spacing(12).into();
771793

772794
let rt_content = column![
@@ -905,11 +927,26 @@ impl GPUBenchApp {
905927
"Compute" => {
906928
if res.subcategory == "FP64" { self.gpu_fp64 = self.gpu_fp64.max(value); }
907929
if res.subcategory == "FP32" { self.gpu_fp32 = self.gpu_fp32.max(value); }
908-
if res.subcategory == "FP16" { self.gpu_fp16 = self.gpu_fp16.max(value); }
909-
if res.subcategory == "BF16" { self.gpu_bf16 = self.gpu_bf16.max(value); }
910-
if res.subcategory == "FP8" { self.gpu_fp8 = self.gpu_fp8.max(value); }
911-
if res.subcategory == "INT8" { self.gpu_int8 = self.gpu_int8.max(value); }
912-
if res.subcategory == "INT4" { self.gpu_int4 = self.gpu_int4.max(value); }
930+
if res.subcategory == "FP16" {
931+
if res.configIndex == 0 { self.gpu_fp16_vector = self.gpu_fp16_vector.max(value); }
932+
else { self.gpu_fp16_matrix = self.gpu_fp16_matrix.max(value); }
933+
}
934+
if res.subcategory == "BF16" {
935+
if res.configIndex == 0 { self.gpu_bf16_vector = self.gpu_bf16_vector.max(value); }
936+
else { self.gpu_bf16_matrix = self.gpu_bf16_matrix.max(value); }
937+
}
938+
if res.subcategory == "FP8" {
939+
if res.configIndex == 0 { self.gpu_fp8_vector = self.gpu_fp8_vector.max(value); }
940+
else { self.gpu_fp8_matrix = self.gpu_fp8_matrix.max(value); }
941+
}
942+
if res.subcategory == "INT8" {
943+
if res.configIndex == 0 { self.gpu_int8_vector = self.gpu_int8_vector.max(value); }
944+
else { self.gpu_int8_matrix = self.gpu_int8_matrix.max(value); }
945+
}
946+
if res.subcategory == "INT4" {
947+
if res.configIndex == 0 { self.gpu_int4_vector = self.gpu_int4_vector.max(value); }
948+
else { self.gpu_int4_matrix = self.gpu_int4_matrix.max(value); }
949+
}
913950
}
914951
"Ray Tracing" => {
915952
if res.subcategory == "Alpha-Tested Geometry" { self.gpu_rt_anyhit = self.gpu_rt_anyhit.max(value); }

packaging/windows/icon.ico

123 KB
Binary file not shown.

0 commit comments

Comments
 (0)