Skip to content

Commit 19b60a2

Browse files
committed
Specify when to rebuild.
Sort of fixes #79. This will do a quick rebuild once and than not rebuild. It does this because of the way I set it up for the blog post to make it extra clear what runs where.
1 parent 27b6f27 commit 19b60a2

File tree

7 files changed

+7
-0
lines changed

7 files changed

+7
-0
lines changed

blog/2024-11-25-optimizing-matmul/code/crates/cpu/compiled_for_gpu/isomorphic/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::path::{Path, PathBuf};
55

66
fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let gpu_crate_path = Path::new("../../../gpu/tiling_2d");
8+
println!("cargo::rerun-if-changed={}", gpu_crate_path.display());
89

910
// Compile the shader crate with SpirvBuilder.
1011
let result = SpirvBuilder::new(gpu_crate_path, "spirv-unknown-vulkan1.2")

blog/2024-11-25-optimizing-matmul/code/crates/cpu/compiled_for_gpu/naive/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::path::{Path, PathBuf};
55

66
fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let gpu_crate_path = Path::new("../../../gpu/naive");
8+
println!("cargo::rerun-if-changed={}", gpu_crate_path.display());
89

910
// Compile the shader crate with SpirvBuilder.
1011
let result = SpirvBuilder::new(gpu_crate_path, "spirv-unknown-vulkan1.2")

blog/2024-11-25-optimizing-matmul/code/crates/cpu/compiled_for_gpu/tiling_1d/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::path::{Path, PathBuf};
55

66
fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let gpu_crate_path = Path::new("../../../gpu/tiling_1d");
8+
println!("cargo::rerun-if-changed={}", gpu_crate_path.display());
89

910
// Compile the shader crate with SpirvBuilder.
1011
let result = SpirvBuilder::new(gpu_crate_path, "spirv-unknown-vulkan1.2")

blog/2024-11-25-optimizing-matmul/code/crates/cpu/compiled_for_gpu/tiling_1d_loop/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::path::{Path, PathBuf};
55

66
fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let gpu_crate_path = Path::new("../../../gpu/tiling_1d_loop");
8+
println!("cargo::rerun-if-changed={}", gpu_crate_path.display());
89

910
// Compile the shader crate with SpirvBuilder.
1011
let result = SpirvBuilder::new(gpu_crate_path, "spirv-unknown-vulkan1.2")

blog/2024-11-25-optimizing-matmul/code/crates/cpu/compiled_for_gpu/tiling_2d/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::path::{Path, PathBuf};
55

66
fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let gpu_crate_path = Path::new("../../../gpu/tiling_2d");
8+
println!("cargo::rerun-if-changed={}", gpu_crate_path.display());
89

910
// Compile the shader crate with SpirvBuilder.
1011
let result = SpirvBuilder::new(gpu_crate_path, "spirv-unknown-vulkan1.2")

blog/2024-11-25-optimizing-matmul/code/crates/cpu/compiled_for_gpu/workgroup_256/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::path::{Path, PathBuf};
55

66
fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let gpu_crate_path = Path::new("../../../gpu/workgroup_256");
8+
println!("cargo::rerun-if-changed={}", gpu_crate_path.display());
89

910
// Compile the shader crate with SpirvBuilder.
1011
let result = SpirvBuilder::new(gpu_crate_path, "spirv-unknown-vulkan1.2")

blog/2024-11-25-optimizing-matmul/code/crates/cpu/compiled_for_gpu/workgroup_2d/build.rs

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use std::path::{Path, PathBuf};
55

66
fn main() -> Result<(), Box<dyn std::error::Error>> {
77
let gpu_crate_path = Path::new("../../../gpu/workgroup_2d");
8+
println!("cargo::rerun-if-changed={}", gpu_crate_path.display());
89

910
// Compile the shader crate with SpirvBuilder.
1011
let result = SpirvBuilder::new(gpu_crate_path, "spirv-unknown-vulkan1.2")

0 commit comments

Comments
 (0)