-
Notifications
You must be signed in to change notification settings - Fork 6
Patch for codegen debugging #104
Patch for codegen debugging #104
Conversation
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.
test_link is pure debugging code and is not needed anywhere at this point and so should be removed entirely. The debugging code can likewise be removed. Basically, none of these changes matter from a correctness perspective. They were all in there trying to debug a previous issue that has now been resolved. You can leave or remove the misspelling of finalize_dynamic_globals as you see fit.
There is also the call for I can remove it and test. |
Conclusion:
|
@PokhodenkoSA I think that was support for initializing the CSA target. I think you can safely remove it but it should be tested. |
Moved to upstream: numba#6466 |
|
||
def finalize(self): | ||
""" | ||
Finalize the library. After this call, nothing can be added anymore. | ||
Finalization involves various stages of code optimization and | ||
linking. | ||
""" | ||
if config.DEBUG_ARRAY_OPT >= 1: | ||
print("CodeLibrary::finalize", self._name) | ||
#require_global_compiler_lock() |
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.
When require_global_compiler_lock()
uncommented dppl
tests fail:
======================================================================
FAIL: test_bool_arg (numba_dppy.tests.dppl.test_arg_types.TestDPPLArrayArgGPU)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/localdisk/work/spokhode/numba-dppy/numba_dppy/tests/dppl/test_arg_types.py", line 90, in test_bool_arg
check_bool_kernel[global_size, dppl.DEFAULT_LOCAL_SIZE](A, True)
File "/localdisk/work/spokhode/numba-dppy/numba_dppy/compiler.py", line 510, in __call__
kernel = self.specialize(*args)
File "/localdisk/work/spokhode/numba-dppy/numba_dppy/compiler.py", line 533, in specialize
self.access_types)
File "/localdisk/work/spokhode/numba-dppy/numba_dppy/compiler.py", line 123, in compile_kernel
cres = compile_with_dppl(pyfunc, None, args, debug=debug)
File "/localdisk/work/spokhode/numba-dppy/numba_dppy/compiler.py", line 111, in compile_with_dppl
library.finalize()
File "/localdisk/work/spokhode/numba/numba/core/codegen.py", line 255, in finalize
require_global_compiler_lock()
File "/localdisk/work/spokhode/numba/numba/core/compiler_lock.py", line 53, in require_global_compiler_lock
assert global_compiler_lock.is_locked()
AssertionError
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.
@DrTodd13 @reazulhoque
Do you know something about it?
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.
See #120.
This commit fixes misspelling of _finalize_dynamic_globals(). This function is used only in the same file.
Tested locally - no new test fails. Could be merged. |
Changes by @DrTodd13:
commit 2893849 - test_link()
commit 9ba9540 - use config.DEBUG_ARRAY_OPT
commit 2a9fdeb - ll.initialize_all_targets() - commit name: CSA changes.
This changes could be moved to upstream.