Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit f54c5dd

Browse files
authored
Merge pull request #354 from nicolasvasilache/pr/reduce-tuning-unroll
Reduce unrolling factors during tuning
2 parents 167d7fc + 59ca04f commit f54c5dd

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

tc/autotuner/genetic_tuning_harness.cc

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,17 +109,6 @@ void GeneticTunerHarness::stopAfterCurrentGeneration() {
109109

110110
namespace {
111111

112-
std::vector<size_t> filterHigherThan(
113-
const std::vector<size_t>& v,
114-
size_t limit) {
115-
std::vector<size_t> newV;
116-
std::copy_if(
117-
v.begin(), v.end(), std::back_inserter(newV), [limit](size_t val) {
118-
return val <= limit;
119-
});
120-
return newV;
121-
}
122-
123112
void removeDuplicates(std::vector<size_t>& v) {
124113
std::sort(v.begin(), v.end());
125114
v.erase(std::unique(v.begin(), v.end()), v.end());
@@ -158,7 +147,6 @@ size_t largestDim(const std::vector<const DLTensor*>& inputs) {
158147
void GeneticTunerHarness::setupTuningParameters() {
159148
CHECK_GT(kInputs_.size(), 0u);
160149
auto range = inputDivisorsAndPowers2(kInputs_.begin()->second);
161-
auto rangeUpTo64 = filterHigherThan(range, 64);
162150

163151
// 0 is a valid tiling annotation and signals no tiling of that dimension
164152
// 0 is not a valid block / grid annotation
@@ -171,8 +159,7 @@ void GeneticTunerHarness::setupTuningParameters() {
171159
configuration.blockParams.setRange(range, "b");
172160
configuration.gridParams.setRange(range, "g");
173161

174-
configuration.unrollFactor =
175-
RangeParameter({1, 2, 4, 8, 16, 32, 64, 128, 256}, "unroll");
162+
configuration.unrollFactor = RangeParameter({1, 2, 4, 8, 16, 32}, "unroll");
176163
}
177164

178165
CudaMappingOptions GeneticTunerHarness::makeOptions(

0 commit comments

Comments
 (0)