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

Update usage of call_tir #10

Merged
merged 3 commits into from
May 11, 2023
Merged

Update usage of call_tir #10

merged 3 commits into from
May 11, 2023

Conversation

sudeepag
Copy link
Contributor

@sudeepag sudeepag commented May 11, 2023

Running the notebook currently throws the following error:

error: Undefined variable: linear0
 --> /tmp/ipykernel_195051/3764025160.py:58:30
    |  
 58 |              lv0 = R.call_tir(linear0, (x, w0, b0), (1, 128), dtype="float32")
    |                       

Based on the course notes, it appears that the API may have been changed to call_dps_packed, so updating the notebook to reflect the change.

cc @tqchen @jinhongyii @MasterJH5574

Preview

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@sudeepag
Copy link
Contributor Author

Addresses #8.

@tqchen tqchen merged commit b831a49 into mlc-ai:main May 11, 2023
@tqchen
Copy link
Contributor

tqchen commented May 11, 2023

sorry i merged pre-maturely. actually call_tir is right, just that we need to have a cls prefix,

@tvm.script.ir_module
class MyModule:
   @T.prim_func
   def linear():


   @R.function
   def main(x)
         cls = MyModule
         R.call_tir(cls.linear, ...)

@tqchen
Copy link
Contributor

tqchen commented May 11, 2023

@sudeepag can you send an update

@sudeepag
Copy link
Contributor Author

@tqchen Thanks for clarifying. Yes, I will revert to call_tir with the prefix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants