Skip to content
Snippets Groups Projects
Commit 176bbfab authored by cmaffeo2's avatar cmaffeo2
Browse files

Fixed -g argument so more than two GPUs can be provided

parent 7aba75b5
No related branches found
No related tags found
No related merge requests found
...@@ -83,6 +83,7 @@ private: ...@@ -83,6 +83,7 @@ private:
static void init_comms(); static void init_comms();
public: public:
static size_t allGpuSize() { return allGpus.size(); }
static ncclComm_t* comms; static ncclComm_t* comms;
static std::vector<GPU> gpus; static std::vector<GPU> gpus;
......
...@@ -59,7 +59,7 @@ int main(int argc, char* argv[]) { ...@@ -59,7 +59,7 @@ int main(int argc, char* argv[]) {
printf(" –––––––––––––––––––––––––––––––––––––––––––––\n"); printf(" –––––––––––––––––––––––––––––––––––––––––––––\n");
GPUManager::init(); GPUManager::init();
size_t n_gpus = max(GPUManager::gpus.size(), 1lu); size_t n_gpus = GPUManager::allGpuSize();
std::vector<unsigned int> gpuIDs; std::vector<unsigned int> gpuIDs;
bool debug = false, safe = false; bool debug = false, safe = false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment