Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compiling with gpu support #3

Closed
WilliamAshbee opened this issue Sep 1, 2022 · 2 comments
Closed

compiling with gpu support #3

WilliamAshbee opened this issue Sep 1, 2022 · 2 comments

Comments

@WilliamAshbee
Copy link

do you have any suggestions on how to compile with gpu support? I ended up installing facebook research's pytorch3d only to figure out you modified their loss functions because I can't compile with gpu support for some reason.
Traceback (most recent call last):
File "main.py", line 260, in
main(hyper_ps)
File "main.py", line 256, in main
loglevel=hps['LOGLEVEL'], resume=args.resume)
File "/v2c/vox2cortex/utils/train.py", line 553, in training_routine
start_epoch=start_epoch)
File "/v2c/vox2cortex/utils/train.py", line 328, in train
loss = self.training_step(model, data, iteration)
File "/v2c/vox2cortex/utils/logging.py", line 252, in time_wrapper
return_value = func(*args, **kwargs)
File "/v2c/vox2cortex/utils/train.py", line 157, in training_step
loss_total = self.compute_loss(model, data, iteration)
File "/v2c/vox2cortex/utils/logging.py", line 252, in time_wrapper
return_value = func(*args, **kwargs)
File "/v2c/vox2cortex/utils/train.py", line 205, in compute_loss
pred = model(x.cuda())
File "/opt/miniconda3/envs/vox2cortex/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/v2c/vox2cortex/utils/logging.py", line 252, in time_wrapper
return_value = func(*args, **kwargs)
File "/v2c/vox2cortex/models/vox2cortex.py", line 121, in forward
pred_meshes, pred_deltaV = self.graph_net(encoder_skips + decoder_skips)
File "/opt/miniconda3/envs/vox2cortex/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/v2c/vox2cortex/utils/logging.py", line 252, in time_wrapper
return_value = func(*args, **kwargs)
File "/v2c/vox2cortex/models/graph_net.py", line 238, in forward
latent_features = self.graph_conv_first(verts_packed, edges_packed)
File "/opt/miniconda3/envs/vox2cortex/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/v2c/vox2cortex/utils/utils_vox2cortex/graph_conv.py", line 80, in forward
features = F.relu(self.norm_first(self.gconv_first(features, edges)))
File "/opt/miniconda3/envs/vox2cortex/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/v2c/vox2cortex/utils/utils_vox2cortex/graph_conv.py", line 35, in forward
return D_inv * super().forward(verts, edges)
File "/app/pytorch3d/pytorch3d/ops/graph_conv.py", line 76, in forward
neighbor_sums = gather_scatter(verts_w1, edges, self.directed)
File "/app/pytorch3d/pytorch3d/ops/graph_conv.py", line 160, in forward
output = _C.gather_scatter(input, edges, directed, backward)
RuntimeError: Not compiled with GPU support.

@WilliamAshbee
Copy link
Author

Looking through the setup.py of the pytorch3d packaged you created, i suspect it is because I don't have CUDA_HOME set (and likely cuda installed)

@WilliamAshbee
Copy link
Author

Had to compile on a cluster machine with gpu. hadn't done this before with nvcc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant