Skip to content

Commit

Permalink
fix argparse bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Sweetnow committed Dec 2, 2024
1 parent db41a69 commit 1f66170
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main.cu
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ int main(int argc, char** argv) {
}

uint device = 0;
auto device_str = parser.get<std::string>("gpu");
device = std::stoi(device_str);
if (cfg["gpu"]) {
device = cfg["gpu"].as<int>();
}

s.Init(name, {
.map_file = map_file,
Expand Down

0 comments on commit 1f66170

Please sign in to comment.