Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Cannot update immutable parameter Z_DRAM #44

Open
1 task
dinghongsong opened this issue Jan 18, 2025 · 3 comments
Open
1 task

TypeError: Cannot update immutable parameter Z_DRAM #44

dinghongsong opened this issue Jan 18, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@dinghongsong
Copy link

Describe the bug

When I run the codes in contributed/matmul.py, I encounter the following error:

TypeError: Cannot update immutable parameter Z_DRAM

This is due to using Z as a parameter to matmul, which is decorated with nki.baremetal().

Is there any way to fix this error?

Expected Behavior

The Optimized matrix multiplication kernel works correctly.

Current Behavior

Cannot update immutable parameter Z_DRAM
when invoke
nl.store(Z_DRAM[m_start:m_end, n_start:n_end], value=Z_SBUF[m1])

Reproduction Steps

python contributed/matmul.py

Regression Issue

  • Select this option if this issue appears to be a regression.

Possible Solution

No response

Additional Information/Context

No response

neuronx-cc version used

NeuronX Compiler version 2.16.372.0+4a9b2326

Framework(s) and their versions used (JAX, PyTorch, etc..)

Python version 3.10.12 HWM version 2.16.0.372+4a9b2326 NumPy version 1.25.2

@dinghongsong dinghongsong added the bug Something isn't working label Jan 18, 2025
@aws-liuayu
Copy link

Thanks @dinghongsong for filing the issue. We will take a look and get back to you.

@aws-zhehongb
Copy link

Looks like we need to change the function singature:

@nki.jit
def nki_matmul_basic_(lhsT, rhs):

we are not passing the result as parameter anymore. Check here

@ggumen
Copy link

ggumen commented Jan 23, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants