Comments (8)
It seems the other way round. Weave uncovers a bug in the recent Nim compiler.
I've tried a bit to isolate the problem.
I've found that state_machine/decline_thief.nim
triggers the error and only in the very last to lines
synthesize(declineReqFSA):
proc decline*(req: sink StealRequest) {.gcsafe, raises: [].}
I hope this helps a bit. Unfortunately, I haven't understood synthesis yet, so it's hard for me to
isolate the code which provokes the compiler error further.
from weave.
I can reproduce this error iff I try to compile weave/parallel_for.nim
itself.
But, when I compile a nim source file which uses parallelFor
there are no problems at all ( checked with several source files)
Unfortunately, I don't understand the logic of Weave
but I think it must compile weave/parallel_for.nim
on the fly when
I use import weave
which in turn imports
weave/[
parallel_tasks, parallel_for, parallel_for_staged,
runtime],
weave/state_machines/[sync_root, sync, sync_scope],
weave/datatypes/flowvars,
weave/cross_thread_com/flow_events,
weave/contexts,
weave/[executor, parallel_jobs]
from weave.
The bug has been fixed in the current developing version of Nim.
from weave.
I think this issue should be fixed by nim-lang/Nim#17657
It would be great if someone can think of a reproducible issue without weave. Anyway weave
should be added to important packages.
nim-lang/Nim#17665
from weave.
Thanks!
from weave.
BTW CI failed(nim-lang/Nim#17665)
https://github.com/nim-lang/Nim/pull/17665/checks?check_run_id=2286001568
/home/runner/work/Nim/Nim/pkgstemp/weave/weave/parallel_for.nim(417, 19) template/generic instantiation of `parallelFor` from here
/home/runner/work/Nim/Nim/pkgstemp/weave/weave/parallel_for.nim(172, 16) Error: redefinition of 'CapturedTy'; previous declaration here: /home/runner/work/Nim/Nim/pkgstemp/weave/weave/parallel_for.nim(172, 16)
stack trace: (most recent call last)
from weave.
This bug is a bit of a shame since I just built a general high level interface for embarassingly parallel problems based on Weave and it effectively kept all of my components that will make use of it on nim <= 1.4.4.
As a side note, on 1.4.4 the interface (and therefore Weave) works like a charm and the performance beats the pants off things like Numba. Color me impressed! :)
from weave.
latest error messages:
========================================================================================
2022-01-08T04:23:39.3361153Z In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:55,
2022-01-08T04:23:39.3362046Z from /usr/lib/gcc/x86_64-linux-gnu/9/include/x86intrin.h:32,
2022-01-08T04:23:39.3362802Z from /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:21:
2022-01-08T04:23:39.3365163Z /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c: In function ‘gebb_ukernel_float64_x86_AVX512__gemm95weave95nestable_1817’:
2022-01-08T04:23:39.3367566Z /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h:325:1: error: inlining failed in call to always_inline ‘_mm512_setzero_pd’: target specific option mismatch
2022-01-08T04:23:39.3368640Z 325 | _mm512_setzero_pd (void)
2022-01-08T04:23:39.3369040Z | ^~~~~~~~~~~~~~~~~
2022-01-08T04:23:39.3370382Z /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:7599:11: note: called from here
2022-01-08T04:23:39.3371252Z 7599 | AB13_1 = _mm512_setzero_pd();
2022-01-08T04:23:39.3372125Z | ^~~~~~~~~~~~~~~~~~~
2022-01-08T04:23:39.3372924Z In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:55,
2022-01-08T04:23:39.3373789Z from /usr/lib/gcc/x86_64-linux-gnu/9/include/x86intrin.h:32,
2022-01-08T04:23:39.3374535Z from /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:21:
2022-01-08T04:23:39.3375973Z /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h:325:1: error: inlining failed in call to always_inline ‘_mm512_setzero_pd’: target specific option mismatch
2022-01-08T04:23:39.3376742Z 325 | _mm512_setzero_pd (void)
2022-01-08T04:23:39.3377097Z | ^~~~~~~~~~~~~~~~~
2022-01-08T04:23:39.3377834Z /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:7596:11: note: called from here
2022-01-08T04:23:39.3378487Z 7596 | AB13_0 = _mm512_setzero_pd();
2022-01-08T04:23:39.3378862Z | ^~~~~~~~~~~~~~~~~~~
2022-01-08T04:23:39.3379800Z In file included from /usr/lib/gcc/x86_64-linux-gnu/9/include/immintrin.h:55,
2022-01-08T04:23:39.3380675Z from /usr/lib/gcc/x86_64-linux-gnu/9/include/x86intrin.h:32,
2022-01-08T04:23:39.3381429Z from /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:21:
2022-01-08T04:23:39.3383222Z /usr/lib/gcc/x86_64-linux-gnu/9/include/avx512fintrin.h:325:1: error: inlining failed in call to always_inline ‘_mm512_setzero_pd’: target specific option mismatch
2022-01-08T04:23:39.3384051Z 325 | _mm512_setzero_pd (void)
2022-01-08T04:23:39.3384391Z | ^~~~~~~~~~~~~~~~~
2022-01-08T04:23:39.3386232Z /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c:7593:11: note: called from here
2022-01-08T04:23:39.3387109Z 7593 | AB12_1 = _mm512_setzero_pd();
2022-01-08T04:23:39.3387575Z | ^~~~~~~~~~~~~~~~~~~
2022-01-08T04:23:39.3388882Z compilation terminated due to -fmax-errors=3.
2022-01-08T04:23:39.3395635Z Error: execution of an external compiler program 'gcc -c -w -fmax-errors=3 -pthread -O3 -fno-strict-aliasing -fno-ident -I/home/runner/work/Nim/Nim/lib -I/home/runner/work/Nim/Nim/pkgstemp/weave/benchmarks/matmul_gemm_blas/gemm_pure_nim -o /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c.o /home/runner/.cache/nim/gemm_weave_nestable_r/@mgemm_weave_nestable.nim.c' failed with exit code: 1
ref mratsim/Arraymancer#505
ref mratsim/Arraymancer#542
from weave.
Related Issues (20)
- `blockUntilAny` equivalent
- GC Boehm Error with more than 8 threads HOT 2
- parallelFor has arguments that do not fit in the parallel tasks data buffer HOT 9
- a plea for an easier to understand error message HOT 3
- affinity_posix should get this patch (for Android/Termux)
- @mratsim
- Cache misses (much) worse for page-aligned (e.g. power of two) accesses
- Raytracing example doesnt compile with threads HOT 1
- UX: auto-transform captured seq to ptr UncheckedArray behind the scenes HOT 3
- functions with no arguments fail parsing HOT 1
- Is there a manual or tutorial for weave? HOT 2
- Weave doesn't compile on MacOS with arm64 HOT 2
- Error: undeclared identifier: 'gebb_ukernel_int_x86_AVX512' HOT 2
- Feature Request: Cores as init parameter, respect core perf levels
- Vastly simplify and accelerate memory management. HOT 1
- Use Lnear Congruential Generator to generate work-stealing permutation HOT 1
- randomly "off values" HOT 2
- error: special identifier '_' ignored HOT 3
- Can Weave spawn a thread that sends a Channel message to the main channel without blocking the main thread? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from weave.