"git@developer.sourcefind.cn:yangql/googletest.git" did not exist on "d8db0ca9cf226f37e909982af83845a4cd40800f"
Unverified Commit 14fdedca authored by jihan.yang's avatar jihan.yang Committed by GitHub
Browse files

Modify global gt database to support multi-machine

parent 3b9549c9
......@@ -64,7 +64,8 @@ class DataBaseSampler(object):
db_data_path = self.root_path.resolve() / self.sampler_cfg.DB_DATA_PATH[0]
sa_key = self.sampler_cfg.DB_DATA_PATH[0]
if cur_rank % num_gpus == 0 and not os.path.exists(f"/dev/shm/{sa_key}"):
# assume 8 gpus per machine
if cur_rank % 8 == 0 and not os.path.exists(f"/dev/shm/{sa_key}"):
gt_database_data = np.load(db_data_path)
common_utils.sa_create(f"shm://{sa_key}", gt_database_data)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment