-
Notifications
You must be signed in to change notification settings - Fork 49
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
rebar compile
doesn't create cl_drv.so
file
#11
Comments
One way to fix it is to add %% == Pre/Post Command Hooks ==
{post_hooks, [{clean, "make clean"},
{compile, "make"}]}.
As in this commit: |
Since I am developing for multiple versions and releases I tend to compile for both 32- and 64- bit (debug/release) at the same to save some time. I guess I am the only one that does it like this? I will try to get some time to make a rebar compatible release soon. I will also push som 1.2 fixes soon. |
For development you may add make target to compile all combinations 4 combinations:
But for the end user, who added |
I have made a major cleanup. But not yet in master. You will find the result in branch 'dev'. It should compile with and without rebar. I removed a lot of junk so I may have removed to much. I also need to beg Dan to have a look ion the effects on the win32 platform. Please have a look. Thanks. Tony. |
I tested branch https://github.com/nivertech/cl_examples/tree/zvi_test_cl_dev My system is Ubuntu 10.04 32 bit with AMD APP SDK.
Most examples work, except: 1> cl_basic:test().
PlatformInfo: [{profile,"FULL_PROFILE"},
{version,"OpenCL 1.2 AMD-APP (1113.2)"},
{name,"AMD Accelerated Parallel Processing"},
{vendor,"Advanced Micro Devices, Inc."},
{extensions,"cl_khr_icd cl_amd_event_callback cl_amd_offline_devices"}]
Device: {device_t,145620232,<<>>}
** exception error: bad argument
in function cl:get_device_info/2
called as cl:get_device_info({device_t,145620232,<<>>},preferred_vector_width_half)
in call from cl:get_info_list/5 (src/cl.erl, line 2172)
in call from cl_basic:'-test/1-fun-0-'/1 (src/cl_basic.erl, line 20)
in call from lists:foreach/2 (lists.erl, line 1262)
in call from cl_basic:test/1 (src/cl_basic.erl, line 17) and 7> cl_test:test0().
** exception error: no match of right hand side value {error,invalid_platform}
in function cl_test:test0/1 (src/cl_test.erl, line 19)
8> cl_test:test1().
** exception error: no match of right hand side value {error,invalid_platform}
in function cl_test:test1/2 (src/cl_test.erl, line 56) |
Nice. Thanks. I guess some filtering is needed in cl_basic / get_device_info when an info item is not supported in the driver. and Maybe you do not have a cpu device ? |
No, I have CPU device only. I think the behavior is changed from master, I.e. the output of cl_basic:test() was exactly the same as in #13 . |
Ok, I found it. A bit too much device_info for openCL 1.0. At least it works on my Linux machines right now. |
Or what do cl:versions() return on your machine? |
With lastest 1> cl:versions().
[{1,0}]
3> cl_test:test0().
** exception error: no match of right hand side value {error,invalid_platform}
in function cl_test:test0/1 (src/cl_test.erl, line 19)
4> cl_test:test1().
** exception error: no match of right hand side value {error,invalid_platform}
in function cl_test:test1/2 (src/cl_test.erl, line 56)
9> cl_basic:test().
PlatformInfo: [{profile,"FULL_PROFILE"},
{version,"OpenCL 1.2 AMD-APP (1113.2)"},
{name,"AMD Accelerated Parallel Processing"},
{vendor,"Advanced Micro Devices, Inc."},
{extensions,"cl_khr_icd cl_amd_event_callback cl_amd_offline_devices"}]
Device: {device_t,169058000,<<>>}
DeviceInfo: [{type,[cpu]},
{vendor_id,4098},
{max_compute_units,2},
{max_work_item_dimensions,3},
{max_work_group_size,1024},
{max_work_item_sizes,[1024,1024,1024]},
{preferred_vector_width_char,16},
{preferred_vector_width_short,8},
{preferred_vector_width_int,4},
{preferred_vector_width_long,2},
{preferred_vector_width_float,4},
{preferred_vector_width_double,2},
{max_clock_frequency,800},
{address_bits,32},
{max_read_image_args,128},
{max_write_image_args,8},
{max_mem_alloc_size,1073741824},
{image2d_max_width,8192},
{image2d_max_height,8192},
{image3d_max_width,2048},
{image3d_max_height,2048},
{image3d_max_depth,2048},
{image_support,true},
{max_parameter_size,4096},
{max_samplers,16},
{mem_base_addr_align,1024},
{min_data_type_align_size,128},
{single_fp_config,[denorm,inf_nan,round_to_nearest,round_to_zero,
round_to_inf,fma]},
{global_mem_cache_type,read_write},
{global_mem_cacheline_size,64},
{global_mem_cache_size,32768},
{global_mem_size,3758096384},
{max_constant_buffer_size,65536},
{max_constant_args,8},
{local_mem_type,global},
{local_mem_size,32768},
{error_correction_support,false},
{profiling_timer_resolution,1},
{endian_little,true},
{available,true},
{compiler_available,true},
{execution_capabilities,[kernel,native_kernel]},
{queue_properties,[profiling_enable]},
{name,"Intel(R) Core(TM)2 Duo CPU P8600 @ 2.40GHz"},
{vendor,"GenuineIntel"},
{driver_version,"1113.2 (sse2)"},
{profile,"FULL_PROFILE"},
{version,"OpenCL 1.2 AMD-APP (1113.2)"},
{extensions,"cl_khr_fp64 cl_amd_fp64 cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_gl_sharing cl_ext_device_fission cl_amd_device_attribute_query cl_amd_vec3 cl_amd_printf cl_amd_media_ops cl_amd_popcnt "},
{platform,{platform_t,169057944,<<>>}}]
ContextInfo: [{reference_count,1},
{devices,[{device_t,169058000,<<>>}]},
{properties,[]}]
Context2: [{reference_count,1},
{devices,[{device_t,169058000,<<>>}]},
{properties,[]}]
Queue: {command_queue_t,3008851184,<<>>}
QueueInfo: [{context,{context_t,3008850328,<<>>}},
{device,{device_t,169058000,<<>>}},
{reference_count,1},
{properties,[]}]
Sampler1: {sampler_t,3008874352,<<>>}
Sampler1Info: [{reference_count,1},
{context,{context_t,3008850328,<<>>}},
{normalized_coords,true},
{addressing_mode,clamp},
{filter_mode,nearest}]
** exception error: no match of right hand side value {error,invalid_value}
in function cl_basic:test_sampler/2 (src/cl_basic.erl, line 148)
in call from lists:foreach/2 (lists.erl, line 1262)
in call from cl_basic:test/1 (src/cl_basic.erl, line 34)
10> |
strange, the versions says {1,0} only but the platform is {1,2} could you please try to |
I run with latest
In order to rule out, that it's problem with my laptop's environment, I'll check it soon on clean VM on AWS EC2. |
Running
rebar compile
doesn't compile native code in the same way samake
does.Running
rebar clean compile
does createpriv/cl_drv.so
, butcl
app expect it to be underlib/{release,debug}/{32,64}
.I think the more standard way is to have everything under
priv
.cl_drv.so
under priv created:but all the other folders are empty:
The text was updated successfully, but these errors were encountered: