Skip to content

Commit

Permalink
fix cuda
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisFelipeCoelho committed Jul 28, 2023
1 parent e359771 commit a1baf02
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
14 changes: 3 additions & 11 deletions Tests/UnitTests/Plugins/Cuda/Seeding/SeedFinderCudaTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,12 @@ int main(int argc, char** argv) {
bool do_cpu(true);
int nGroupToIterate = 500;
int skip = 0;
int skipZBin = 0;
int deviceID = 0;
int nTrplPerSpBLimit = 100;
int nAvgTrplPerSpBLimit = 2;

int opt;
while ((opt = getopt(argc, argv, "haf:n:s:z:d:l:m:qG")) != -1) {
while ((opt = getopt(argc, argv, "haf:n:s:d:l:m:qG")) != -1) {
switch (opt) {
case 'a':
allgroup = true;
Expand All @@ -101,9 +100,6 @@ int main(int argc, char** argv) {
case 's':
skip = atoi(optarg);
break;
case 'z':
skipZBin = atoi(optarg);
break;
case 'd':
deviceID = atoi(optarg);
break;
Expand Down Expand Up @@ -137,9 +133,6 @@ int main(int argc, char** argv) {
std::cout << " -s SKIP : Number of groups to skip in seed "
"finding. Default is "
<< skip << std::endl;
std::cout << " -z SKIPZ : Number of z bins to skip in seed "
"finding. Default is "
<< skipZBin << std::endl;
std::cout << " -d DEVID : NVIDIA GPU device ID. Default is "
<< deviceID << std::endl;
std::cout << " -l : A limit on the average number of triplets "
Expand Down Expand Up @@ -269,8 +262,7 @@ int main(int argc, char** argv) {
auto start_cpu = std::chrono::system_clock::now();

int group_count;
auto groupIt =
Acts::BinnedSPGroupIterator<SpacePoint>(spGroup, skip, skipZBin);
auto groupIt = Acts::BinnedSPGroupIterator<SpacePoint>(spGroup, skip);

//----------- CPU ----------//
group_count = 0;
Expand Down Expand Up @@ -306,7 +298,7 @@ int main(int argc, char** argv) {

group_count = 0;
std::vector<std::vector<Acts::Seed<SpacePoint>>> seedVector_cuda;
groupIt = Acts::BinnedSPGroupIterator<SpacePoint>(spGroup, skip, skipZBin);
groupIt = Acts::BinnedSPGroupIterator<SpacePoint>(spGroup, skip);

Acts::SpacePointData spacePointData;
spacePointData.resize(spVec.size());
Expand Down
6 changes: 2 additions & 4 deletions Tests/UnitTests/Plugins/Cuda/Seeding2/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,7 @@ int main(int argc, char* argv[]) {
if (!cmdl.onlyGPU) {
decltype(seedFinder_host)::SeedingState state;
for (std::size_t i = 0; i < cmdl.groupsToIterate; ++i) {
auto spGroup_itr = Acts::BinnedSPGroupIterator(
spGroup, i, sfConfig.skipZMiddleBinSearch);
auto spGroup_itr = Acts::BinnedSPGroupIterator(spGroup, i);
if (spGroup_itr == spGroup.end()) {
break;
}
Expand Down Expand Up @@ -215,8 +214,7 @@ int main(int argc, char* argv[]) {

// Perform the seed finding.
for (std::size_t i = 0; i < cmdl.groupsToIterate; ++i) {
auto spGroup_itr =
Acts::BinnedSPGroupIterator(spGroup, i, sfConfig.skipZMiddleBinSearch);
auto spGroup_itr = Acts::BinnedSPGroupIterator(spGroup, i);
if (spGroup_itr == spGroup_end) {
break;
}
Expand Down

0 comments on commit a1baf02

Please sign in to comment.