module 'tutel_custom_kernel' has no attribute 'inject_source'
See original GitHub issueMy cuda version is 11.4, python version is 3.6.5
Following the requirement, my torch and torchvision versions are torch==1.10.0+cu113
and torchvision==0.11.1+cu113
.
Then I run
git clone https://github.com/microsoft/tutel --branch v0.1.x
python ./tutel/setup.py install --user
then run the tutorial:
python ./tutel/examples/helloworld.py --batch_size=16
but meet the following error:
Traceback (most recent call last):
File "./tutel/examples/helloworld.py", line 118, in <module>
output = model(x)
File "/home/fanj/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "./tutel/examples/helloworld.py", line 85, in forward
result = self._moe_layer(input)
File "/home/fanj/.local/lib/python3.6/site-packages/torch/nn/modules/module.py", line 1102, in _call_impl
return forward_call(*input, **kwargs)
File "/home/fanj/tutel/tutel/impls/moe_layer.py", line 424, in forward
result_output, l_aux = self.gates[gate_index].apply_on_expert_fn(reshaped_input, self)
File "/home/fanj/tutel/tutel/impls/moe_layer.py", line 73, in apply_on_expert_fn
critical_data, l_loss = extract_critical(gates, self.top_k, self.capacity_factor, self.fp32_gate, self.batch_prioritized_routing)
File "/home/fanj/tutel/tutel/impls/fast_dispatch.py", line 163, in extract_critical
locations1 = compute_location(masks_se[0])
File "/home/fanj/tutel/tutel/jit_kernels/gating.py", line 83, in fast_cumsum_sub_one
return get_cumsum_kernel(int(data.size(0)), int(data.size(1)))(data)
File "/home/fanj/tutel/tutel/jit_kernels/gating.py", line 68, in get_cumsum_kernel
''')
File "/home/fanj/tutel/tutel/impls/jit_compiler.py", line 31, in generate_kernel
return JitCompiler.create_raw(template)
File "/home/fanj/tutel/tutel/impls/jit_compiler.py", line 21, in create_raw
__ctx__ = tutel_custom_kernel.inject_source(source)
AttributeError: module 'tutel_custom_kernel' has no attribute 'inject_source'
Do you know how to solve this problem? Thank you very much!
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
module has no attribute - python - Stack Overflow
The problem is submodules are not automatically imported. You have to explicitly import the api module: import myproject.mymodule.api print ...
Read more >How to Resolve Module Has No Attribute - Python Error ...
In this tutorial I will be showing you how to MANAGE THE " MODULE HAS NO ATTRIBUTE " ERROR MESSAGE using Python. This...
Read more >AttributeError: 'module' object has no attribute and ImportError
This video covers the AttributeError: ' module ' object has no attribute and ImportError: No module name errors in Python.
Read more >[Solved] AttributeError: module has no attribute ... - YouTube
[Solved] AttributeError: module has no attribute 'Attribute'. 33K views 5 years ago. MyCodingZone. MyCodingZone. 1.2K subscribers. Subscribe.
Read more >Django AttributeError 'module' object has no attribute 'detail'
How to fix Python Django AttributeError ' module ' object has no attribute 'detail'Exception Type: AttributeErrorException Value: ' module ' ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@LisaWang0306 That dependency-missing error will just skip NCCL related optimization, so it shouldn’t be related to the next one. Will any of these commands work?
FAST_CUMSUM=0 python -m tutel.examples.helloworld
USE_NVRTC=0 python -m tutel.examples.helloworld
It can help to determine which option triggers your issue, since I cannot reproduce that in all of our environments. Thanks!
There are no more issues left. Thanks!