-
Notifications
You must be signed in to change notification settings - Fork 242
Cythonize _program.py #1565
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
base: main
Are you sure you want to change the base?
Cythonize _program.py #1565
Changes from all commits
af1b908
08a02c0
a136180
182feab
b9b90d6
c15b12e
95f149a
754e295
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -816,7 +816,8 @@ cdef class ObjectCode: | |
| try: | ||
| name = self._sym_map[name] | ||
| except KeyError: | ||
| name = name.encode() | ||
| if isinstance(name, str): | ||
| name = name.encode() | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Slipped in this small fix.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm, I thought |
||
|
|
||
| cdef KernelHandle h_kernel = create_kernel_handle(self._h_library, <const char*>name) | ||
| if not h_kernel: | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,15 @@ | ||||||
| # SPDX-FileCopyrightText: Copyright (c) 2024-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| # | ||||||
| # SPDX-License-Identifier: Apache-2.0 | ||||||
|
|
||||||
| from ._resource_handles cimport NvrtcProgramHandle, NvvmProgramHandle | ||||||
|
|
||||||
|
|
||||||
| cdef class Program: | ||||||
| cdef: | ||||||
| NvrtcProgramHandle _h_nvrtc | ||||||
| NvvmProgramHandle _h_nvvm | ||||||
| str _backend | ||||||
| object _linker # Linker | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TODO: cythonize linker! :D |
||||||
| object _options # ProgramOptions | ||||||
| object __weakref__ | ||||||
Uh oh!
There was an error while loading. Please reload this page.
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.
yes this is a nice outcome of using megaheader (cybind's feature) 👍