vsl
vsl copied to clipboard
vcl macOS broken
Describe the bug
vsl/example/vcl_opencl_basic/main.v broke on current system.
The bug is when loading to the device buffer. signal 11: segmentation fault 0 libsystem_platform.dylib 0x000000018845da24 _sigtramp + 56 1 OpenCL 0x00000001f045285c clWaitForEvents + 284 2 main 0x0000000104e50818 vsl__vcl__cl_wait_for_events + 204 3 main 0x0000000104e506b4 anon_fn_9a762a286f3451f5_vsl__vcl__clevent_chan_ierror_1034 + 52 4 main 0x0000000104e50614 anon_fn_9a762a286f3451f5_vsl__vcl__clevent_chan_ierror_1034_thread_wrapper + 44 5 main 0x0000000104ecb2b8 GC_pthread_start_inner + 224 6 main 0x0000000104ec3fa0 GC_pthread_start + 48 7 libsystem_pthread.dylib 0x000000018842f034 _pthread_start + 136 8 libsystem_pthread.dylib 0x0000000188429e3c thread_start + 8
compile command: v -d vsl_vcl_dlopencl -cg -cc gcc run main.v
Expected Behavior
Expected behaviour is the behaviour described by the example.
Current Behavior
Segmentation-fault caused on line 33.
32 | data := [f32(0.0), 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
33 │ err := <-v.load(data) // breaks here
34 │ if err !is none {
35 │ panic(err)
36 │ }
Reproduction Steps
v -d vsl_vcl_dlopencl -cg -cc gcc run main.v in vsl/examples/vcl_opencl_basic
Possible Solution
Unknown, the image examples works.
Additional Information/Context
No response
V version
V 0.4.6 6a550ab
Version used
Latest
Environment details (OS name and version, etc.)
V full version: V 0.4.6 39e550f.6a550ab OS: macos, macOS, 14.0, 23A344 Processor: 8 cpus, 64bit, little endian, Apple M2
getwd: /Users/andreas/.vmodules/vsl/examples/vcl_opencl_basic vexe: /Users/andreas/v/v vexe mtime: 2024-05-21 14:21:50
vroot: OK, value: /Users/andreas/v VMODULES: OK, value: /Users/andreas/.vmodules VTMP: OK, value: /tmp/v_501
Git version: git version 2.44.0 Git vroot status: 0.4.6-8-g6a550ab8 (2 commit(s) behind V master) .git/config present: true
CC version: Apple clang version 15.0.0 (clang-1500.0.40.1) thirdparty/tcc status: thirdparty-macos-arm64 5c1d002f