Skip to content
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

"synchronized" equivalent in Python API #4

Closed
mhsmith opened this issue Oct 8, 2017 · 2 comments
Closed

"synchronized" equivalent in Python API #4

mhsmith opened this issue Oct 8, 2017 · 2 comments

Comments

@mhsmith
Copy link
Member

mhsmith commented Oct 8, 2017

Proposed syntax:

from java import synchronized
with synchronized(o):    # o must be a Java object or array
    ...
@mhsmith
Copy link
Member Author

mhsmith commented Jan 18, 2021

MonitorEnter is a blocking operation so must be contained within "nogil".

Test strategy may be similar to the existing GIL-related tests.

@mhsmith
Copy link
Member Author

mhsmith commented Jan 18, 2021

Closing due to lack of demand.

@mhsmith mhsmith closed this as completed Jan 18, 2021
mhsmith added a commit that referenced this issue Jul 20, 2022
On NDK r19c, the pytorch build crashed with the following error on all ABIs:

  1.    <eof> parser at end of file
  2.    Per-file LLVM IR generation
  3.    aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.DEFAULT.cpp:306:3 <Spelling=aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.DEFAULT.cpp:309:9>: Generating code for declaration 'at::native::(anonymous namespace)::sinc_kernel(at::TensorIterator &)::(anonymous class)::operator()()::(anonymous class)::operator()()::(anonymous class)::operator()'
  4.    aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.DEFAULT.cpp:306:3 <Spelling=aten/src/ATen/native/cpu/UnaryOpsKernel.cpp.DEFAULT.cpp:312:18>: LLVM IR generation of compound statement ('{}')
  #0 0x000000000234c8c6 llvm::sys::PrintStackTrace(llvm::raw_ostream&) (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x234c8c6)
  #1 0x000000000234b4d0 llvm::sys::RunSignalHandlers() (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x234b4d0)
  #2 0x000000000234cbaa (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x234cbaa)
  #3 0x00007f3f2c4ee0c0 __restore_rt (/lib/x86_64-linux-gnu/libpthread.so.0+0x110c0)
  #4 0x0000000003638bb1 clang::VarDecl::isThisDeclarationADefinition(clang::ASTContext&) const (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x3638bb1)
  #5 0x0000000003638f8b clang::VarDecl::getDefinition(clang::ASTContext&) (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x3638f8b)
  #6 0x00000000036396d1 clang::VarDecl::getTemplateInstantiationPattern() const (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x36396d1)
  #7 0x00000000025de075 (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x25de075)
  #8 0x00000000025de082 (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x25de082)
  [repeats]
  #255 0x00000000025de082 (/home/smith/git/chaquo/python/target/toolchains/armeabi-v7a/bin/clang80+++0x25de082)
  clang80++: error: unable to execute command: Segmentation fault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant