#BackendCompilerFailed

20 messages · Page 1 of 1 (latest)

fair dirge
#

BackendCompilerFailed: backend='inductor' raised:
TypeError: cannot pickle '_thread.RLock' object

Got this error, when trying to locally fine-tune the gemma3 model.
I searched online and couldn't find people having the same poroblem as me. I also asked AI, who told me to disable the compiler. This didn't work, I wasn't even able to select a different backend_compiler.
I am using a Jetson orin nano with Ubuntu 22.04, Cuda 12.6.68, python 3.10.12.

details on the error and the notebook in question:
https://github.com/AntonStantan/matura/blob/main/pre-trained-tranformers/gemma_unsloth.ipynb

some important package versions:
torch 2.8.0
triton 3.4.0
transformers 4.56.0
unsloth 2025.8.9
unsloth_zoo 2025.8.9

The error is very deep, I suggest there might be a problem with the dependencies. Any help will be appreciated. Thanks in advance.

GitHub

matura project called "Predictive Calculator". Here I investigate Neural Networks for elementary arithmetic tasks - AntonStantan/matura

eternal stoneBOT
#

Your error BackendCompilerFailed: backend='inductor' raised: TypeError: cannot pickle '_thread.RLock' object is likely due to incompatibility between PyTorch's inductor backend and the Jetson Orin Nano (ARM architecture). Unsloth and PyTorch inductor are primarily tested and supported on x86_64 with NVIDIA GPUs, not ARM-based Jetson devices. Disabling torch.compile or switching backend is not officially supported for Unsloth on Jetson, and there is no documented workaround for this specific error in the official Unsloth or PyTorch documentation. According to Unsloth troubleshooting, Windows and non-x86_64 platforms have known backend issues, and disabling torch.compile is only a workaround for Windows, not ARM.

If you are on Jetson/ARM, Unsloth is not guaranteed to work due to lack of inductor backend support. There is no official support or fix for this error on Jetson/ARM in the Unsloth documentation or GitHub issues. You may need to use an x86_64 machine with a supported NVIDIA GPU for Unsloth fine-tuning, or try a different framework that supports ARM/Jetson. Would you like more detail on possible workarounds or alternative approaches?

Sources:

quasi crest
#

@fair dirge is this your own local machine?

fair dirge
#

yes

quasi crest
#

oh question: what's your GPU?

#

is it a blackwell card?

fair dirge
#

@quasi crest Jetson orin nano developper kit, why?

quasi crest
#

oh

#

yes you're the second person having an issue wtih the jetson orin

#

we need to write an install guide for this

#

i'll ping the rest of the team about this . We've been slow about this cause we don't own one so we can't properly troubleshoot

#

sorry couldn't provide an answer on the spot

fair dirge
#

so you're saying it's just a problem with my unsloth installation?

fair dirge
#

I'd also be down to help with the installation guide if you need me.

#

@eternal stone Can you tell me about a different framework, which supports ARM architectures?

eternal stoneBOT
#

The Unsloth documentation I have ingested does not mention which alternative LLM fine-tuning frameworks support ARM architectures such as the Jetson Orin Nano. For your use case, it would help to specify whether you need full fine-tuning, parameter-efficient fine-tuning (like LoRA/QLoRA), or just inference, as well as the size of the models you intend to use. If this doesn't help, please reach out to the Unsloth support team for further assistance.

dawn lance
# quasi crest i'll ping the rest of the team about this . We've been slow about this cause we...

I'll curate and provide my notes if useful; as I am working thorugh this atm; I needed to build triton dependency as there are no arm arch buils only x86_64 && I've just got nVidia's version of pytorch building for the Jetson orin nano super this morning (was failing yesterday evening) I plan to retry getting unsloth up and running based on this as the detection was failing (noted yesterday the torch. gpu detection was failing), post work today plan to take a look and see if this is still a problem.

dawn lance
# dawn lance I'll curate and provide my notes if useful; as I am working thorugh this atm; I ...

facing a blocker atm, the build for pytorch completes OK; though cannot get the resulting build to install to allow the python import (for now).
UPDATE 2025-09-04: after reading a lot of docs, seems you are forced to use jetson-containers to build l4t-pytorch and from within that running container torch can be launched, this is building right now and will update again later if this is the right direction;
UPDATE 2025-09-05 hit a wall with builds failing and lack of time to work on this, any pointers appreciated.