[问题/Issue] 章节3.2.3:针对添加Apple Silicon GPU用户的代码补充 / Chapter3.2.3: Code additions for users with Apple Silicon GPUs
documentation
### 1. 遇到问题的章节 / Affected Chapter
Chapter3.2.3
### 2. 问题类型 / Issue Type
文档不清晰 / Unclear Documentation
### 3. 具体问题描述 / Problem Description
教程只提供了针对NVIDIA显卡的代码
`device = "cuda" if torch.cuda.is_available() else "cpu"`
希望可以添加Apple Silicon GPU初学者用户的代码教程
`device = "mps" if torch.backends.mps.is_available() else "cpu"`
### 4. 问题重现材料 / Reproduction Materials
```python
device = "cuda" if torch.cuda.is_available() else "cpu"
```
```bash
Using device: cpu
```
### 5. 补充信息 / Additional Information
_No response_
### 确认事项 / Verification
- [x] 我已阅读过相关章节的文档 / I have read the relevant chapter documentation
- [x] 我已搜索过现有的Issues,确认此问题未被报告 / I have searched existing Issues and confirmed this hasn't been reported
- [ ] 我已尝试过基本的故障排除(如重启、重新安装依赖等) / I have tried basic troubleshooting (restart, reinstall dependencies, etc.)
0 条评论