Summary
A recent upstream change added src/candle/accelerator.py, but the beginner tensor tutorial still fails because Candle does not expose accelerator on the top-level torch/candle module.
So the issue is no longer 'module missing on disk' — it is now specifically a top-level export / compat surface wiring gap.
Current state
Upstream now contains:
src/candle/accelerator.py
But src/candle/__init__.py still does not expose accelerator, so this still fails:
import torch
print(torch.accelerator.is_available())
when USE_CANDLE=1 redirects torch to Candle.
Environment
- Repo:
candle-org/candle
- Tested from latest
upstream/main on 2026-03-27
- Commit tested:
f37302f
- macOS Apple Silicon
- Python 3.11.15
- Candle installed editable from a fresh worktree
- Torch compat hook installed via
python -m candle.torch_compat install
- Repro run with
USE_CANDLE=1
Minimal reproduction
source ~/miniconda3/etc/profile.d/conda.sh && conda run -n candle311-tutorials \
env USE_CANDLE=1 python -c "import torch; print(torch.accelerator.is_available())"
Observed
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: module 'candle' has no attribute 'accelerator'
Expected
If src/candle/accelerator.py is the intended compatibility implementation, it should be reachable through the top-level compat surface so that:
torch.accelerator.is_available()
torch.accelerator.current_accelerator()
work under USE_CANDLE=1.
Tutorial impact
This still blocks:
beginner/basics/tensorqs_tutorial.py
Likely source
src/candle/accelerator.py now exists
src/candle/__init__.py does not re-export or otherwise attach accelerator
Related
Summary
A recent upstream change added
src/candle/accelerator.py, but the beginner tensor tutorial still fails because Candle does not exposeacceleratoron the top-leveltorch/candlemodule.So the issue is no longer 'module missing on disk' — it is now specifically a top-level export / compat surface wiring gap.
Current state
Upstream now contains:
src/candle/accelerator.pyBut
src/candle/__init__.pystill does not exposeaccelerator, so this still fails:when
USE_CANDLE=1redirectstorchto Candle.Environment
candle-org/candleupstream/mainon 2026-03-27f37302fpython -m candle.torch_compat installUSE_CANDLE=1Minimal reproduction
Observed
Expected
If
src/candle/accelerator.pyis the intended compatibility implementation, it should be reachable through the top-level compat surface so that:work under
USE_CANDLE=1.Tutorial impact
This still blocks:
beginner/basics/tensorqs_tutorial.pyLikely source
src/candle/accelerator.pynow existssrc/candle/__init__.pydoes not re-export or otherwise attachacceleratorRelated