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

F.set_kmap_mode() has no effect #308

Open
1 task done
rfeinman opened this issue Jun 3, 2024 · 1 comment
Open
1 task done

F.set_kmap_mode() has no effect #308

rfeinman opened this issue Jun 3, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rfeinman
Copy link

rfeinman commented Jun 3, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I am using the bleeding-edge TorchSparse library and it seems like F.set_kmap_mode("hashmap") has no effect. My code looks as follows:

from torchsparse.nn import functional as F

F.set_kmap_mode("hashmap")

However, it appears that my convolution ops are still using the "hashmap_on_the_fly" kmap mode. I get an error message saying ValueError: Unsupported kmap_mode: hashmap_on_the_fly for generative convolution (please switch to kmap_mode=hashmap).

The following code snippet does seem to work, but it is slightly more involved (and not clear from the docs):

conv_config = F.conv_config.get_default_conv_config(conv_mode=F.get_conv_mode())
conv_config.kmap_mode = 'hashmap'
F.conv_config.set_global_conv_config(conv_config)

Expected Behavior

I expect that F.set_kmap_mode("hashmap") would change the kmap mode used for convolution.

Environment

- GCC: gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
- NVCC: Build cuda_12.2.r12.2/compiler.33191640_0
- PyTorch: 2.2.0
- PyTorch CUDA: 12.1
- TorchSparse: 2.1.0 (installed from source in May, 2024)

Anything else?

No response

@Tortoise0Knight
Copy link

Same problem here, thank you for walkaway solution

@zhijian-liu zhijian-liu added the bug Something isn't working label Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants