mirror of
https://github.com/nerfstudio-project/nerfstudio.git
synced 2026-11-14 11:54:01 +08:00
Tiny-cuda-nn and fixed logic for instant-ngp (#102)
* correcting implementation for instant ngp * instant ngp with tcnn * black and pylint * merged master
This commit is contained in:
1 parent
8cc4c063df
commit
7d8beaaed4
17 files changed
+477
-43
No files matched your search
@@ -100,7 +100,7 @@ def _distributed_worker(
|
||||
|
||||
assert num_gpus_per_machine <= torch.cuda.device_count()
|
||||
torch.cuda.set_device(local_rank)
|
||||
_set_random_seed(1234 + global_rank)
|
||||
_set_random_seed(config.seed + global_rank)
|
||||
comms.synchronize(world_size)
|
||||
|
||||
output = main_func(local_rank, world_size, config)
|
||||
@@ -149,11 +149,11 @@ def launch(
|
||||
world_size = num_machines * num_gpus_per_machine
|
||||
if world_size == 0:
|
||||
# Using only CPU and one process.
|
||||
_set_random_seed(0)
|
||||
_set_random_seed(config.seed)
|
||||
main_func(local_rank=0, world_size=0, config=config)
|
||||
elif world_size == 1:
|
||||
# Using one gpu and one process.
|
||||
_set_random_seed(0)
|
||||
_set_random_seed(config.seed)
|
||||
try:
|
||||
main_func(local_rank=0, world_size=1, config=config)
|
||||
except KeyboardInterrupt:
|
||||
|
||||
Reference in new issue
Block a user