Skip to content

Guard against attribute error#1042

Open
xuzhao9 wants to merge 1 commit intomainfrom
export-D102627731
Open

Guard against attribute error#1042
xuzhao9 wants to merge 1 commit intomainfrom
export-D102627731

Conversation

@xuzhao9
Copy link
Copy Markdown
Contributor

@xuzhao9 xuzhao9 commented Apr 27, 2026

Summary:
Sometime third-party packages can be imported but there is no desired attribute, for example:

    from .operator import Operator
    _ = tk.bf16_b200_gemm
        ^^^^^^^^^^^^^^^^^
AttributeError: module 'thunderkittens' has no attribute 'bf16_b200_gemm'

Handle attribute error in try_import


overriding_review_checks_triggers_an_audit_and_retroactive_review
Oncall Short Name: triton

Differential Revision: D102627731

Summary:
Sometime third-party packages can be imported but there is no desired attribute, for example:

```
    from .operator import Operator
    _ = tk.bf16_b200_gemm
        ^^^^^^^^^^^^^^^^^
AttributeError: module 'thunderkittens' has no attribute 'bf16_b200_gemm'
```

Handle attribute error in `try_import`

___

overriding_review_checks_triggers_an_audit_and_retroactive_review
Oncall Short Name: triton

Differential Revision: D102627731
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Apr 27, 2026

@xuzhao9 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D102627731.

@xuzhao9 xuzhao9 temporarily deployed to docker-s3-upload April 27, 2026 20:58 — with GitHub Actions Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant