Update tag decorator to support attributes with string value#129
Merged
jamesthejellyfish merged 1 commit intoHuawei-CPLLab:mainfrom Mar 4, 2026
Merged
Conversation
7f1a301 to
c7056c3
Compare
jamesthejellyfish
requested changes
Mar 4, 2026
Collaborator
jamesthejellyfish
left a comment
There was a problem hiding this comment.
Mostly LGTM. Are you able to add a simple testcase for this behaviour? Just to make sure that nothing we do down the line messes this up, and as an example of how to use this. Also we could probably combine this functionality with int_attr so that we just use tag for everything (maybe a keyword argument for an optional type? I know int_attr right now assumes Index but that isn't always ideal), but that could be another PR later down the line, so it's not necessary to do right now
c7056c3 to
4626414
Compare
src/pydsl/type.py
Outdated
| @classmethod | ||
| def CType(cls) -> tuple[type]: | ||
| ctypes_map = { | ||
| 16: np.float16, |
Collaborator
There was a problem hiding this comment.
I think this might be a change from a different PR creeping in?
4626414 to
3784951
Compare
src/pydsl/type.py
Outdated
| @@ -1,5 +1,6 @@ | |||
| from __future__ import annotations | |||
|
|
|||
| import numpy as np | |||
Collaborator
There was a problem hiding this comment.
this numpy import is still here from earlier
3784951 to
c63e1a5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch update tag decorator to support attributes that has string value.