-
Notifications
You must be signed in to change notification settings - Fork 5
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
Fix attribute error for detr #1008
base: main
Are you sure you want to change the base?
Conversation
@@ -29,6 +29,9 @@ def test_detr_detection(variant): | |||
input_batch = preprocess_input_data(image_url) | |||
|
|||
# Compiler test | |||
compiler_cfg = forge.config._get_global_compiler_config() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's try without model overrides. It would be best to fix the root cause of the issue without fine-tuning compiler behavior.
Do you have a wider context of the problem solved with these flags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zeros op is binded as global_var and passed as input params to tvmgen_default_forge_main.
def @main(%pixel_values: Tensor[(1, 3, 427, 640), float32] /* ty=Tensor[(1, 3, 427, 640), float32] span=aten::size_0.pixel_values:0:0 */, %model.query_position_embeddings.weight: %0 = zeros(shape=[1, 100, 256], dtype="float32") /* ty=Tensor[(1, 100, 256), float32] span=C.graph: aten::zeros_like, jit._trace.TopLevelTracedModule: %1 = @tvmgen_default_forge_main_0(%0, %model.query_position_embeddings.weight, %model.decoder.layers.0.
This behaviour is observed after tvm transform.PartitionGraph , hence adding these flags was binding the zeros op into tvm module.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, do you have an example from reportify of how this looks like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And do you know where are these zeros
coming from? I can't infer precise info based on TVM IR you provided..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the changes now by bringing in a workaround in forge_utils mentioned here.
80ca96a
to
ea522c5
Compare
e39f1e7
to
c53886b
Compare
c53886b
to
b3bf31b
Compare
No description provided.