Skip to content

Commit

Permalink
Merge pull request #187 from intel/develop
Browse files Browse the repository at this point in the history
Fix block-thread binding in auto-tuner.
  • Loading branch information
chuckyount authored Dec 15, 2018
2 parents 1861594 + bffc9eb commit 96988d6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,8 @@ val1 := $(DEF_TEST_ARGS) -d 48 -r 32 -b 24 -mb 16 -rt 1 $(EXTRA_TEST_ARGS)
val2 := $(DEF_TEST_ARGS) -d 63 -r 32 -b 24 -mb 16 -rt 2 $(EXTRA_TEST_ARGS)
val3 := $(DEF_TEST_ARGS) -d 63 -r 48 -b 24 -mb 16 -bt 2 $(EXTRA_TEST_ARGS)
val4a := $(DEF_TEST_ARGS) -d 48 -b 24 -mb 16 -bt 2 -bind_block_threads $(EXTRA_TEST_ARGS)
val4b := $(DEF_TEST_ARGS) -d 48 -b 24 -mb 16 -bt 2 -use_shm -overlap_comms $(EXTRA_TEST_ARGS)
val4c := $(DEF_TEST_ARGS) -d 48 -b 24 -mb 16 -bt 2 -use_shm -no-overlap_comms $(EXTRA_TEST_ARGS)
val4b := $(DEF_TEST_ARGS) -d 48 -b 24 -mb 16 -bt 2 -use_shm $(EXTRA_TEST_ARGS)
ranks := 2

# Run the kernel binary using several combos of sizes and ranks.
Expand Down
6 changes: 3 additions & 3 deletions utils/bin/yask_tuner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,7 @@ ()
$runCmd .= " -host $host" if defined $host;
}
$runCmd .= " -exe_prefix '$exePrefix' -stencil $stencil -arch $arch -no-pre_auto_tune";
$runCmd .= " -ranks $nranks" if $nranks > 1;
return $runCmd;
}

Expand Down Expand Up @@ -787,7 +788,7 @@ ($$$)
close CMD;
}
if (!$numSpatialGrids) {
map { print ">> $_"; } @cmdOut;
map { print ">> $_\n"; } @cmdOut;
die "error: no relevant grid allocations found in '$cmd'; $0 only works with 'x, y, z' 3-D stencils.\n";
}
print "Determined that $numSpatialGrids XYZ grids are allocated.\n";
Expand Down Expand Up @@ -1314,11 +1315,10 @@ sub fitness {

# how to run.
my $runCmd = getRunCmd(); # shell command plus any initial args.
$runCmd .= " -ranks $nranks" if $nranks > 1;
my $args = ""; # exe args.
$args .= " -thread_divisor $thread_divisor";
$args .= " -block_threads $block_threads";
$args .= ($bind_block_threads ? " " : " -no") "-bind_block_threads"
$args .= ($bind_block_threads ? " " : " -no"). "-bind_block_threads";

# sizes.
$args .= " -dx $ds[0] -dy $ds[1] -dz $ds[2]";
Expand Down

0 comments on commit 96988d6

Please sign in to comment.