Skip to content

Commit

Permalink
Merge branch 'blank_slate' into c003_update
Browse files Browse the repository at this point in the history
  • Loading branch information
FiveMovesAhead committed Oct 10, 2024
2 parents 32a28a9 + 1edbceb commit a668c34
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build_algorithm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,17 +41,17 @@ jobs:
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-wasi
# - name: Install CUDA
# if: env.SKIP_JOB != 'true'
# uses: Jimver/[email protected]
# id: cuda-toolkit
# with:
# cuda: '12.1.0'
# method: network
# sub-packages: '["nvcc"]'
# - name: Cargo Build CUDA
# if: env.SKIP_JOB != 'true'
# run: cargo build -p tig-algorithms --release --features cuda
- name: Install CUDA
if: env.SKIP_JOB != 'true'
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '12.1.0'
method: network
sub-packages: '["nvcc"]'
- name: Cargo Build CUDA
if: env.SKIP_JOB != 'true'
run: cargo build -p tig-algorithms --release --features cuda
- name: Cargo Build WASM
if: env.SKIP_JOB != 'true'
run: >
Expand Down
8 changes: 4 additions & 4 deletions docs/guides/innovating.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ language governing permissions and limitations under the License.
// num_queries: 10,
// better_than_baseline: 350,
};
let seeds = [0; 8]; // change this to generate different instances
let challenge = Challenge::generate_instance(seeds, &difficulty).unwrap();
let seed = [0u8; 32]; // change this to generate different instances
let challenge = Challenge::generate_instance(seed, &difficulty).unwrap();
match <algorithm_name>::solve_challenge(&challenge) {
Ok(Some(solution)) => match challenge.verify_solution(&solution) {
Ok(_) => println!("Valid solution"),
Expand Down Expand Up @@ -215,9 +215,9 @@ mod cuda_tests {
// num_queries: 10,
// better_than_baseline: 350,
};
let seeds = [0; 8]; // change this to generate different instances
let seed = [0u8; 32]; // change this to generate different instances
let challenge =
Challenge::cuda_generate_instance(seeds, &difficulty, &dev, challenge_cuda_funcs)
Challenge::cuda_generate_instance(seed, &difficulty, &dev, challenge_cuda_funcs)
.unwrap();
match <algorithm_name>::cuda_solve_challenge(&challenge, &dev, algorithm_cuda_funcs) {
Ok(Some(solution)) => match challenge.verify_solution(&solution) {
Expand Down
4 changes: 2 additions & 2 deletions tig-challenges/src/satisfiability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,13 @@ pub const KERNEL: Option<CudaKernel> = None;
impl crate::ChallengeTrait<Solution, Difficulty, 2> for Challenge {
#[cfg(feature = "cuda")]
fn cuda_generate_instance(
seeds: [u64; 4],
seed: [u8; 32],
difficulty: &Difficulty,
dev: &Arc<CudaDevice>,
mut funcs: HashMap<&'static str, CudaFunction>,
) -> Result<Self> {
// TIG dev bounty available for a GPU optimisation for instance generation!
Self::generate_instance(seeds, difficulty)
Self::generate_instance(seed, difficulty)
}

fn generate_instance(seed: [u8; 32], difficulty: &Difficulty) -> Result<Self> {
Expand Down
4 changes: 2 additions & 2 deletions tig-challenges/src/vector_search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@ pub const KERNEL: Option<CudaKernel> = None;
impl ChallengeTrait<Solution, Difficulty, 2> for Challenge {
#[cfg(feature = "cuda")]
fn cuda_generate_instance(
seeds: [u8; 32],
seed: [u8; 32],
difficulty: &Difficulty,
dev: &Arc<CudaDevice>,
mut funcs: HashMap<&'static str, CudaFunction>,
) -> Result<Self> {
// TIG dev bounty available for a GPU optimisation for instance generation!
Self::generate_instance(seeds, difficulty)
Self::generate_instance(seed, difficulty)
}

fn generate_instance(seed: [u8; 32], difficulty: &Difficulty) -> Result<Self> {
Expand Down
4 changes: 2 additions & 2 deletions tig-challenges/src/vehicle_routing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ pub const KERNEL: Option<CudaKernel> = None;
impl crate::ChallengeTrait<Solution, Difficulty, 2> for Challenge {
#[cfg(feature = "cuda")]
fn cuda_generate_instance(
seeds: [u8; 32],
seed: [u8; 32],
difficulty: &Difficulty,
dev: &Arc<CudaDevice>,
mut funcs: HashMap<&'static str, CudaFunction>,
) -> Result<Self> {
// TIG dev bounty available for a GPU optimisation for instance generation!
Self::generate_instance(seeds, difficulty)
Self::generate_instance(seed, difficulty)
}

fn generate_instance(seed: [u8; 32], difficulty: &Difficulty) -> Result<Challenge> {
Expand Down

0 comments on commit a668c34

Please sign in to comment.