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

Experimental support for aliasscopes #31489

Merged
merged 2 commits into from
Apr 12, 2019
Merged

Experimental support for aliasscopes #31489

merged 2 commits into from
Apr 12, 2019

Conversation

vchuravy
Copy link
Member

@mbauman the first commit fixes the seqfault you saw. If broadcast is going to use these I figured we should put them into a better place and mark them clearly as experimental.

Test should probably be similar to the ones in #31347

@vchuravy vchuravy added compiler:codegen Generation of LLVM IR and native code needs tests Unit tests are required for this change labels Mar 26, 2019
@vtjnash
Copy link
Member

vtjnash commented Mar 27, 2019

Should we put this in Future?

@mbauman
Copy link
Member

mbauman commented Mar 27, 2019

Future doesn't really make sense for two reasons — one is that it's not certain it'll be in the future, and two is that I want to use it for broadcast to fix #28126.

@vchuravy vchuravy requested review from JeffBezanson and Keno March 29, 2019 22:54
@vchuravy vchuravy removed the needs tests Unit tests are required for this change label Mar 29, 2019
@vchuravy
Copy link
Member Author

Okay I added some simple tests. @mbauman and @YingboMa if you have some more ideas for which cases you care about that would be great.

Jeff/Keno are we okay with adding this implementation as is, I previously didn't do so since all my use-cases were outside of base.

@vchuravy vchuravy marked this pull request as ready for review March 29, 2019 22:57
@vchuravy vchuravy added the triage This should be discussed on a triage call label Apr 3, 2019
@YingboMa
Copy link
Contributor

YingboMa commented Apr 3, 2019

Unfortunately, this PR + d839bc5 still does not quite solve 28126, as

broadcast_unalias(dest, src) = dest === src ? src : constify(unalias(dest, src))

is not type stable.

@JeffBezanson JeffBezanson removed the triage This should be discussed on a triage call label Apr 11, 2019
@vchuravy
Copy link
Member Author

Added docstrings that clarify that Const and @aliasscope are experimental.

@vchuravy
Copy link
Member Author

Only 50ec39c should be backported to 1.2

@vchuravy
Copy link
Member Author

This looks like a missing root, anyone seen this before?

error during bootstrap:
GC error (probable corruption) :
Allocations: 96441027 (Pool: 96436176; Big: 4851); GC: 581
<?#14EF9F80::00000000>
0B37E020: Queued root: 14A62090 :: 059209D0 (bits: 3)
        of type Array{Any, 1}
0B37E02C: Queued root: 14B2F700 :: 05920790 (bits: 3)
        of type Core.TypeMapEntry
0B37E038: Queued root: 13DEB3A0 :: 059209D0 (bits: 3)
        of type Array{Any, 1}
0B37E044: Queued root: 148F9140 :: 059209D0 (bits: 3)
        of type Array{Any, 1}
0B37E050: Queued root: 142F24A0 :: 059209D0 (bits: 3)
        of type Array{Any, 1}
0B37E05C: Queued root: 13DD22C0 :: 059209D0 (bits: 3)
        of type Array{Any, 1}
0B37E068: Queued root: 143EDA00 :: 059209D0 (bits: 3)
        of type Array{Any, 1}
0B37E074: Queued root: 14307BC0 :: 059209D0 (bits: 3)
        of type Array{Any, 1}
0B37E080: Queued root: 136C0880 :: 059209D0 (bits: 3)
        of type Array{Any, 1}
0B37E08C: Queued root: 066E82E0 :: 059209D0 (bits: 3)
        of type Array{Any, 1}
0B37E098:  r-- Stack frame 00C91400 -- 0 of 2 (direct)
Unknown pc 6FC7AF10 --- ABORTING !!!
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
signal (22): SIGABRT
in expression starting at none:0
raise at C:\Windows\SYSTEM32\msvcrt.dll (unknown line)
abort at C:\Windows\SYSTEM32\msvcrt.dll (unknown line)
gc_assert_datatype_fail at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gc.c:1522
gc_mark_loop at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gc.c:2409
_jl_gc_collect at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gc.c:2715
jl_gc_collect at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gc.c:2886
jl_gc_pool_alloc at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gc.c:1102 [inlined]
jl_gc_alloc_ at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\julia_internal.h:274 [inlined]
jl_gc_alloc at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gc.c:2923
_new_array_ at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\array.c:100
_new_array at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\array.c:160 [inlined]
jl_alloc_array_1d at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\array.c:420
anymap at .\compiler\utilities.jl:39
argtypes_to_type at .\compiler\typeutils.jl:46 [inlined]
abstract_call at .\compiler\abstractinterpretation.jl:800
abstract_call at .\compiler\abstractinterpretation.jl:598
abstract_eval_call at .\compiler\abstractinterpretation.jl:837
abstract_eval at .\compiler\abstractinterpretation.jl:907
typeinf_local at .\compiler\abstractinterpretation.jl:1164
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1220
typeinf at .\compiler\typeinfer.jl:12
abstract_call_method_with_const_args at .\compiler\abstractinterpretation.jl:222
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:115
abstract_call at .\compiler\abstractinterpretation.jl:808
abstract_call at .\compiler\abstractinterpretation.jl:598
abstract_eval_call at .\compiler\abstractinterpretation.jl:837
abstract_eval at .\compiler\abstractinterpretation.jl:907
typeinf_local at .\compiler\abstractinterpretation.jl:1164
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1220
typeinf at .\compiler\typeinfer.jl:12
abstract_call_method_with_const_args at .\compiler\abstractinterpretation.jl:222
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:115
abstract_call at .\compiler\abstractinterpretation.jl:808
abstract_call at .\compiler\abstractinterpretation.jl:598
abstract_eval_call at .\compiler\abstractinterpretation.jl:837
abstract_eval at .\compiler\abstractinterpretation.jl:907
typeinf_local at .\compiler\abstractinterpretation.jl:1164
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1220
typeinf at .\compiler\typeinfer.jl:12
abstract_call_method_with_const_args at .\compiler\abstractinterpretation.jl:222
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:115
abstract_call at .\compiler\abstractinterpretation.jl:808
abstract_call at .\compiler\abstractinterpretation.jl:598
abstract_eval_call at .\compiler\abstractinterpretation.jl:837
abstract_eval at .\compiler\abstractinterpretation.jl:907
typeinf_local at .\compiler\abstractinterpretation.jl:1164
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1220
typeinf at .\compiler\typeinfer.jl:12
abstract_call_method_with_const_args at .\compiler\abstractinterpretation.jl:222
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:115
abstract_call at .\compiler\abstractinterpretation.jl:808
abstract_call at .\compiler\abstractinterpretation.jl:598
abstract_eval_call at .\compiler\abstractinterpretation.jl:837
abstract_eval at .\compiler\abstractinterpretation.jl:907
typeinf_local at .\compiler\abstractinterpretation.jl:1150
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1220
typeinf at .\compiler\typeinfer.jl:12
typeinf_edge at .\compiler\typeinfer.jl:482
abstract_call_method at .\compiler\abstractinterpretation.jl:369
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:92
abstract_call at .\compiler\abstractinterpretation.jl:808
abstract_call at .\compiler\abstractinterpretation.jl:598
abstract_eval_call at .\compiler\abstractinterpretation.jl:837
abstract_eval at .\compiler\abstractinterpretation.jl:907
typeinf_local at .\compiler\abstractinterpretation.jl:1164
typeinf_nocycle at .\compiler\abstractinterpretation.jl:1220
typeinf at .\compiler\typeinfer.jl:12
typeinf_ext at .\compiler\typeinfer.jl:568
typeinf_ext at .\compiler\typeinfer.jl:599
unknown function (ip: 09F4048D)
jl_apply_generic at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gf.c:2191
jl_apply at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\julia.h:1604 [inlined]
jl_type_infer at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gf.c:207
jl_compile_method_internal at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gf.c:1773
jl_apply_generic at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\gf.c:2196
jl_apply at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\julia.h:1604 [inlined]
jl_call2 at /home/Administrator/buildbot/worker/package_win32/build/src/home/Administrator/buildbot/worker/package_win32/build/src\jlapi.c:227
exec_program at /home/Administrator/buildbot/worker/package_win32/build/ui/home/Administrator/buildbot/worker/package_win32/build/ui\repl.c:45
true_main at /home/Administrator/buildbot/worker/package_win32/build/ui/home/Administrator/buildbot/worker/package_win32/build/ui\repl.c:108
wmain at /home/Administrator/buildbot/worker/package_win32/build/ui/home/Administrator/buildbot/worker/package_win32/build/ui\repl.c:217
__tmainCRTStartup at /usr/src/debug/mingw64-i686-runtime-6.0.0-1/usr/src/debug/mingw64-i686-runtime-6.0.0-1/crt\crtexe.c:334
BaseThreadInitThunk at C:\Windows\SYSTEM32\KERNEL32.DLL (unknown line)
RtlInitializeExceptionChain at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
RtlInitializeExceptionChain at C:\Windows\SYSTEM32\ntdll.dll (unknown line)
Allocations: 96441027 (Pool: 96436176; Big: 4851); GC: 581
*** This error might be fixed by running `make clean`. If the error persists, try `make cleanall`. ***
make[1]: Leaving directory '/home/Administrator/buildbot/worker/package_win32/build'

@vchuravy vchuravy merged commit c53d3f8 into master Apr 12, 2019
@vchuravy vchuravy deleted the vc/experimental branch April 12, 2019 20:25
@KristofferC KristofferC mentioned this pull request Apr 15, 2019
58 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:codegen Generation of LLVM IR and native code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants