[R-SIG-Mac] M3 not working with torch

Gilberto Camara g||berto@c@m@r@ @end|ng |rom |npe@br
Mon May 20 23:52:23 CEST 2024


Dear Simon

Many thanks for your response and suggestions. I have raised an issue in the R torch repository: 

https://github.com/mlverse/torch/issues/1167

All the best
Gilberto
============================
Prof Dr Gilberto Camara
Senior Researcher
National Institute for Space Research (INPE), Brazil
https://gilbertocamara.org/
=============================




> On 20 May 2024, at 17:48, Simon Urbanek <simon.urbanek using R-project.org> wrote:
> 
> Gilberto,
> 
> since luz is a contributed package, you should probably start first by asking the authors. Given that the torch ecosystem is quite complex and has several layers that need to work together, even if you talk to them, you probably need to add details such as exact versions used (including the torch and metal layers) and how you installed the pieces (I know you helpfully supplied sesisonInfo() but I suspect that info such as exact torch run-time is pertinent as well). Next step would be to trace the error - check the system crash reporter or run R -d lldb to find out the exact library the crash happens in which may give you more clues. I don't have any M3 machines so I can't check myself, unfortunately.
> 
> Cheers,
> Simon
> 
> 
> 
>> On 21/05/2024, at 12:48 AM, Gilberto Camara <gilberto.camara using inpe.br> wrote:
>> 
>> Dear R-SIG-MAC
>> 
>> I bought a new MacBook Air with the M3 chip, which has 8 CPUs, 10 GPUs, and 16GB of integrated memory. My R `torch` apps are crashing. I have assembled an MWE that works on other Mac architectures, including MacBook Air M1 and MacMini. The OS is the same (Sonoma 14.5). The MWE follows:
>> [...]
>> ```
>> The error occurs in the `luz::fit` function. Inside RStudio, the code gets stuck, and then RStudio asks to restart R. When running R from the terminal, the output is:
>> ```{r}
>> *** caught bus error ***
>> address 0x16daa0000, cause 'invalid alignment'
>> 
>> *** caught segfault ***
>> address 0x9, cause 'invalid permissions'
>> zsh: segmentation fault  R
>> ```
>> The `sessionInfo()` output is as follows:
> 
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac



More information about the R-SIG-Mac mailing list