HIP error while using rocm

My code:


sequences = df['tweetV2'].to_list()

candidate_labels = ["positive", "neutral", "negative"]

hypothesis_template = "The sentiment of this review is {}."

predictions = []

for sequence in tqdm(sequences, desc="Classifying Sentiments"):
    result = classifier(sequence, candidate_labels, hypothesis_template=hypothesis_template)
    predictions.append(result)

hf_prediction = pd.DataFrame(predictions)

always outputs this:

RuntimeError: HIP error: invalid device function
Compile with `TORCH_USE_HIP_DSA` to enable device-side assertions.

Im not sure what is going wrong, this works fine with cpu but for some reason never works with the rocm… Stable diffusion works using rocm and i’m not sure why this won’t.

Any help would be appreciated.

(edit)
I changed from using rocm 5.7 to 5.6 and got the same error when i went to 5.5 i just got

Classifying Sentiments: 0%| | 0/116174 [00:00<?, ?it/s]Segmentation fault (core dumped)

This used to work and im not sure why it doesn’t work anymore…

1 Like

Seems like the problem is connected to the GPU and PCIe configuration
https://rocm.docs.amd.com/projects/radeon/en/latest/docs/limitations.html#errors-due-to-gpu-and-pcie-configuration

1 Like

That is not an option with my current configuration, using torch for rocm 5.2 worked just fine when running rocm 5.7 on my machine.