Tagged release-1.2.4
upgrade package version to 1.2.4
inst/ocl_tests.m: add typeinfo test
inst/ocl_tests.m: simplify type comparison
maint: update copyright dates
src/ocl_ov_matrix_ops.cc: avoid calling assert()
Tagged release-1.2.3
upgrade package version to 1.2.3
Hi Matt, As I mentioned quite long ago, the code has such problem which can cause AMD problems on some test cases. Now warnings will come with Octave 9.1 on Windows. I think it is time to fix this. Best wishes, Jinchuan In file included from ocl_ov_matrix.h:38, from ocl_ov_matrix_fcns.cc:37: In member function 'OclArray<t>& OclArray<t>::operator=(const OclArray<t>&) [with T = double ', inlined from 'octave_value_list Focl_linspace(const octave_value_list&, int)' at ocl_ov_m atrix_fcns.cc:410:98:...
Dear Matt, I come back to this question. Since there will be definite asy. workflow breakage. The breakage I encounted is quite normal in cases such as sort algorithms and path searching (still way better than CPU). Then the work is to minize the cost. My thought would be to use a reduced version of nnz to get the size of A<0 in GPU and exchanged the size with host. Then we know what the size of C(B) would be. I did not mean to ask you to implement this for I know your time is very precious. I do...
Bugs reported to apple via developer discussion: https://discussions.apple.com/thread/254494854.
Dear Matt, I was going to report some problems to Apple then I realized one problem maybe due to no defination of field CL_DEVICE_HALF_FP_CONFIG in the spec if I am right. //ocl_context.cc t2.setfield ("fp_config", get_device_prop (device, CL_DEVICE_HALF_FP_CONFIG)); Bad results produced by Mac OS M1: ocl: calling OpenCL function 'clGetDeviceInfo' returned error 'CL_INVALID_OPERATION' (-59). error: OpenCL function call error error: called from ocl_tests at line 85 column 11 Best wishes, Jinchuan...
After a long time, MS finally confirmed this as a good bug and claimed to fix this problem.
Dear Matt and the concerned readers, Shall we recall the opensource community to add FFT, random number generators as well as the deep neural network support to Octave-ocl? I would be very happy to assist to organize these activities and give my own suggestions. Although I believe both time and funding are challenging. If there are people who voluntarily/willingly use their free time to add the support, please discuss it here with us. In the meanwhile, if somebody/organization would like to contribute...
I have upload a test case to preproduce MS’ runtime problem and upload it to their GitHub. So let’s wait and see their response. As a result I won’t push to release a patch for this runtime with clfinish for this will definitely disable the batch submission for ocl_cat.
Latest Update(2022.3.9): Hi matt, I would like to share with you about the latest AMD support. Previously, as shown in the AMD community site, AMD has found out the kernel casting problem with pointers in Octave ocl and I found out that oclidx-=1 did not work for indexing. And AMD's platform was the only one that behaves differently from Intel/Nvidia/Apple which forced me to merge the deduction kernel with indexing related operations. I was not happy with this until today. I remembered a very long...
Latest Update(2022.3.9): Hi matt, I would like to share with you about the latest AMD support. Previously, as shown in the AMD community site, AMD has found out the kernel casting problem with pointers in Octave ocl and I found out that oclidx-=1 does not for indexing. And AMD's platform was the only one that behaves differently from Intel/Nvidia/Apple which forced me to merge the deduction kernel with indexing related operations. I was not happy with this until today. I remembered a very long time...
Regarding Intel Graphic Driver workaround: Dear Matt, a long time ago you added a workaround on '!B' as discussed above to support Intel GPUs. Since Intel is going to release its future ARC GPUs, I guess it would be better for Intel to fix the problem rather than programming carefully with a workaround. As a result, I have reported the problem to Intel and they may have fixed this problem in its latest Linux driver, and I guess the Windows driver would also be there soon. The link is here:https://community.intel.com/t5/GPU-Compute-Software/Driver-problem-with-OpenCL-kernel/m-p/1362525...
So, basically, adding clFlush only to a for loop based same-kernel-name submission will work for OpenCLOn12 at a cost of speed for ocl_cat and ndgrid or their related functions. Meanwhile, OpenCLOn12 runtime will give incorrect results for single input+ single output version of max, min, accmax and acumin. It is quite similar to AMD's runtime which has a problem when comparing a pointer with another, which was used in four kernels to check if the index outputs is available or not. Since Matt has...
This one is quite interesting. I now have some clues after testings with different assumptions on ocl_cat. One important thing I discovered was that If a kernel have been enqueued twice or more (e.g., for loop in cat kernel submission), and if none of it is being executed at the device side, then this OpenCLOn12 runtime will ignore the previously queued kernel cmd but only leave the latest one who has the same kernel name. This causes the incorrect results while doing examples like ocl_cat(1,a,a,a)....
Update: The early version to support Apple M1 process (at least Macbook Air M1, 2020, 16GB memory, 2TB HDD) has been upload to https://sourceforge.net/projects/octave-ocl-extra/files/ History: Dear Matt, as well as the people in need, I have opened a new project based on OCL named Octave OCL Extra by bringing support to AMD devices. There is a even great news about bring support to Apple silicon devices M1. Although Apple drop the support for future version of OpenCL, its system still support the...
The failed two ocl tests have been discovered. First One: if ! iscomplex (e) assert (double (to_octave_type (d .^ e)), double (to_octave_type (d) .^ to_octave_type (e)), tol) else # unfortunately, octave computes complex(0)^complex(0) = (0)^complex(0) = NaN + NaNi However, in MacOS M1, even complex(0+0i)^0 will produce NaN+NaNi, which is different for ans =1 in Windows Octave. The bug has been filed to Octave: https://savannah.gnu.org/bugs/index.php?61715 Second one: erf function is not working with...
Dear Matt, as well as the people in need, I have opened a new project based on OCL named Octave OCL Extra by bringing support to AMD devices. There is a even great news about bring support to Apple silicon devices M1. Although Apple drop the support for future version of OpenCL, its system still support the existing OpenCL 1.2 standard. I got my new M1 recently as a part of servers to compile codes. I have to say I was shocked by the compile speed of this chip when running pkg install ocl*.tar.gz...
Dear Matt, That's wonderful! A fantastic combo to support both degree based functions as well as logical indexing. Your analogy about time is very poetic. I guess we are all destined to be busy for solving earthly important things that are unable and uninterested to be solved by others . Best wishes, Jinchuan
Trigonometry functions in degrees not linked
I implemented logical indexing with scalar assignment in OCL with commit 944515. This also makes degree-based trigonometric functions and the like usable with OCL matrices. This feature becomes available with the next OCL release (supposedly 1.2.0). Closing this ticket.
I implemented logical indexing with scalar assignment in OCL with commit 944515, following the second approach described above (with flag), for the reasons stated there. The feature will become available with the next OCL release (supposedly 1.2.0).
inst/ocl_tests.m: add tests for degree-based trigonometric functions
add OCL matrix logically indexed assignment with a scalar value
add OCL matrix flag indicating logical result data
add "fix" OCL matrix method
I am sorry if my earlier comment was somewhat misleading. What I meant in particular is that the degree-based trigonometric functions, along with many other trigonometric and hyperbolic functions, are defined in octave already and do not need to be redefined. More specifically, these ~25 functions are provided in octave as individual m-files (usually in a directory "octave-root/share/octave/x.x.x/m/elfun/"), and not in any octave C++ code. What is lacking in OCL to make these octave m-files work...
I am sorry if my earlier comment was somewhat misleading. What I meant in particular is that the degree-based trigonometric functions, along with many other trigonometric and hyperbolic functions, are defined in octave already and do not need to be redefined. More specifically, these ~25 functions are provided in octave as individual m-files (usually in a directory "octave-root/share/octave/x.x.x/m/elfun/"), and not in any octave C++ code. What is lacking in OCL to make these octave m-files work...
I am sorry if my earlier comment was somewhat misleading. What I meant in particular is that the degree-based trigonometric functions, along with many other trigonometric and hyperbolic functions, are defined in octave already and do not need to be redefined. More specifically, these ~25 functions are provided in octave as individual m-files (usually in a directory "octave-root/share/octave/x.x.x/m/elfun/"), and not in any octave C++ code. What is lacking in OCL to make these octave m-files work...
I am coming back to the case of logical indexing with scalar assignment (e.g., ocl_data_matrix(ocl_logical_matrix) = scalar). (All other cases of logical indexing are forbidden in OCL, see above, since octave cannot know the required OCL matrix sizes.) Even for this very limited use case, OCL would be required to implement matrices in a manner which allows to distinguish whether an OCL matrix used for indexing is meant to be a logical matrix or a matrix holding index values. After profound thinking,...
My recommendation for this case is to use one of the following, instead of "A(A<0)=0": A *= (A>=0), or A = max (A, 0), or A = max (0, A) The last option, with max(0,A), will be supported by OCL version >= 1.2.0 (fixed in repo by commit [da82fd]). As we discussed elsewhere, the inversion error you describe was due to an OpenCL driver error and was already fixed by a workaround in OCL in the 1.1.1 update.
My recommendation for this case is to use one of the following, instead of "A(A<0)=0": A *= (A>=0), or A = max (A, 0), or * A = max (0, A) The last option, with max(0,A), will be supported by OCL version >= 1.2.0 (fixed in repo by commit [da82fd]). As we discussed elsewhere, the inversion error you describe was due to an OpenCL driver error and was already fixed by a workaround in OCL in the 1.1.1 update.
My recommendation for this case is to use one of the following, instead of "A(A<0)=0": A *= (A>=0), or A = max (A, 0), or * A = max (0, A) The last option, with max(0,A), will be supported by OCL version >= 1.2.0 (fixed in repo by commit [da82fd]). As we discussed elsewhere, the inversion error you describe was due to an OpenCL driver error and was already fixed by a workaround in OCL in the 1.1.1 update.
My recommendation for this case is to use one of the following, instead of "A(A<0)=0": A = (A>=0), or A = max (A, 0), or A = max (0, A) The last option, with "max(0,A)", will be supported by OCL version >= 1.2.0 (fixed in repo by commit [da82fd]). As we discussed elsewhere, the inversion error you describe was due to an OpenCL driver error and was already fixed by a workaround in OCL in the 1.1.1 update.
Problem: If you declared oclArray variable on your workspace, then it would be problem when you save, e.g., save('A'), the whole workspace with error: octave_base_value::save_ascii(): wrong type argument 'ocl matrix'. This will cause a problem for not all workspace variables are saved. Then, when you load the workspace after a new octave instance. You will have the same error and the problem for some of the variables are missing. Workaround: save your variable of interest instead of the whole workspace....
The error encountered when saving / loading (partial) workspaces containing OCL variables is fixed with commit [3ed14b] and will be available in the next release (probably 1.2.0). Note, however, that no general saving / loading of OCL data can be implemented. Rather, OCL data (matrices or programs) are simply ignored, or, to be more precise, are treated as if empty or inoperable, when saved. This is a strong requirement, since the OCL data in question is generally strongly dependent on (OpenCL) context...
Pass list (64bits except mentioned otherwise): AMD Ryzen™ 5 4600G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 5 4600G GPU(RX Vega 7, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass AMD Ryzen™ 7 5700G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 7 5700G GPU(RX Vega 8, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass Intel i3-6006U CPU (Skylake-U/Y, Intel 2021 CPU OpenCL driver) OpenCL 2.1 pass Intel i3-6006U GPU (HD Graphics 520, Skylake GT2, Intel 2021 Graphics...
Pass list (64bits except mentioned otherwise): AMD Ryzen™ 5 4600G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 5 4600G GPU(RX Vega 7, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass AMD Ryzen™ 7 5700G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 7 5700G GPU(RX Vega 8, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass Intel i3-6006U CPU (Skylake-U/Y, Intel 2021 CPU OpenCL driver) OpenCL 2.1 pass Intel i3-6006U GPU (HD Graphics 520, Skylake GT2, Intel 2021 Graphics...
Intel i5 7200U CPU (Kabylake-U/Y, Intel 2021 CPU OpenCL driver) OpenCL 2.1 pass Intel i5 7200U GPU (HD Graphics 620, Intel 20XX Graphics driver) OpenCL 2.1 pass
Update: 2021.10.27 After testing with different platforms in my lab, it is safe to say that the attached ocl-full.tar.gz file (which is an enhancement based on octave-ocl version 1.1.1 ) supports many AMD APU/Intel APU/Nvidia GPU devices. History: Update: 2021.10.24. File is uploaded, please kindly have a test and report your device info if possible. Update:2021.10.23, After today's investigation, a version support AMD APU/Intel APU/Nvidia GPU is going to release as an enhancement to octave-ocl soon....
Tested list: AMD Ryzen™ 5 4600G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 5 4600G GPU(RX Vega 7, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass AMD Ryzen™ 7 5700G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 7 5700G GPU(RX Vega 8, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass Intel i3-6006U CPU (Skylake-U/Y, Intel 2021 CPU OpenCL driver) OpenCL 2.1 pass Intel i3-6006U GPU (HD Graphics 520, Skylake GT2, Intel 2021 Graphics driver) OpenCL 3.0 Neo pass Intel...
Update: 2021.10.27 After testing with different platform in my lab, it is safe to say that the attached ocl-full.tar.gz file (which is an enhancement based on octave-ocl version 1.1.1 ) supports many AMD APU/Intel APU/Nvidia GPU devices. History: Update: 2021.10.24. File is uploaded, please kindly have a test and report your device info if possible. Update:2021.10.23, After today's investigation, a version support AMD APU/Intel APU/Nvidia GPU is going to release as an enhancement to octave-ocl soon....
Tested list: AMD Ryzen™ 5 4600G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 5 4600G GPU(RX Vega 8, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass AMD Ryzen™ 7 5700G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 7 5700G GPU(RX Vega 8, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass Intel i3-6006U CPU (Skylake-U/Y, Intel 2021 CPU OpenCL driver) OpenCL 2.1 pass Intel i3-6006U GPU (HD Graphics 520, Skylake GT2, Intel 2021 Graphics driver) OpenCL 3.0 Neo pass Intel...
Tested list: AMD Ryzen™ 7 4600G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 7 4600G GPU(RX Vega 8, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass AMD Ryzen™ 7 5700G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass AMD Ryzen™ 7 5700G GPU(RX Vega 8, AMD 2021 Radeon Graphics driver) OpenCL 2.1 pass Intel i3-6006U CPU (Skylake-U/Y, Intel 2021 CPU OpenCL driver) OpenCL 2.1 pass Intel i3-6006U GPU (HD Graphics 520, Skylake GT2, Intel 2021 Graphics driver) OpenCL 3.0 Neo pass Intel...
Tested list: Intel i3-6006U CPU (Skylake-U/Y, Intel 2021 CPU OpenCL driver) OpenCL 2.1 pass Intel i3-6006U GPU (HD Graphics 520, Skylake GT2, Intel 2021 Graphics driver) OpenCL 3.0 Neo pass Intel i7-1165G7 CPU(Tiger Lake-U, Intel 2021 CPU CPU OpenCL Runtime)OpenCL 2.1 pass Intel i7-1165G7 GPU(Iris Xᵉ Graphics G7 (96 EUs), Intel 2021 Graphics driver)OpenCL 3.0 Neo pass Intel i7-10700K CPU(Comet Lake, Intel 2021 CPU OpenCL Runtime)OpenCL 2.1 pass Intel i9-11900KF CPU(Rocket Lake, Intel 2021 CPU OpenCL...
Promising results with AMD APUs. No more crashes. Matt, please have a look!
Tested list: Intel i3-6006U CPU (Skylake-U/Y, Intel 2021 CPU OpenCL driver) OpenCL 2.1 pass Intel i3-6006U GPU (HD Graphics 520, Skylake GT2, Intel 2021 Graphics driver) OpenCL 3.0 Neo pass Nvidia GeForce 920A (GK208, Nvidia 2019 425.44 driver) OpenCL 1.2 CUDA pass Intel i7-1165G7 CPU(Tiger Lake-U, Intel 2021 CPU CPU OpenCL Runtime)OpenCL 2.1 pass Intel i7-1165G7 GPU(Iris Xᵉ Graphics G7 (96 EUs), Intel 2021 Graphics driver)pass AMD Ryzen™ 7 5700G CPU(Intel 2021 CPU OpenCL Runtime) OpenCL 2.1 pass...
NVIDIA GeForce RTX 3080 (GA102, NVIDIA 472.12) OpenCL 3.0 CUDA pass Intel i7-10700K CPU(Comet Lake, Intel 2021 CPU OpenCL Runtime)OpenCL 2.1 pass
Tested list: Intel i3-6006U CPU (Skylake-U/Y, Intel 2021 CPU OpenCL driver) OpenCL 2.1 pass Intel i3-6006U GPU (HD Graphics 520, Skylake GT2, Intel 2021 Graphics driver) OpenCL 3.0 Neo pass Nvidia GeForce 920A (GK208, Nvidia 2019 425.44 driver) OpenCL 1.2 CUDA pass Intel i7-1165G7 CPU(Tiger Lake-U, Intel 2021 CPU OpenCL driver)pass Intel i7-1165G7 GPU(Iris Xᵉ Graphics G7 (96 EUs), Intel 2021 Graphics driver)pass AMD Ryzen™ 7 5700G CPU(Intel 2021 Graphics driver) OpenCL 2.1 pass AMD Ryzen™ 7 5700G...
Update: 2021.10.24. File is uploaded, please kindly have a test and report your device info if possible. Update:2021.10.23, After today's investigation, a version support AMD APU/Intel APU/Nvidia GPU is going to release as an enhancement to octave-ocl soon. The source code package may be posted here as an attachment early next week. (https://community.amd.com/t5/opencl/whitelist-request-and-a-potential-opencl-driver-problem-with-amd/m-p/494151/highlight/false#M40110)(Update: 2021.10.21 With the help...
Update:2021.10.23, After today's investigation, a version support AMD APU/Intel APU/Nvidia GPU is going to release as an enhancement to octave-ocl soon. The source code package may be posted here as an attachment early next week. (https://community.amd.com/t5/opencl/whitelist-request-and-a-potential-opencl-driver-problem-with-amd/m-p/494151/highlight/false#M40110)(Update: 2021.10.21 With the help of AMD's expert, the problem in the kernel has been located (https://community.amd.com/t5/opencl/whitelist-request-and-a-potential-opencl-driver-problem-with-amd/td-p/492439/highlight/false)....
(Update: 2021.10.21 With the help of AMD's expert, the problem in the kernel has been located (https://community.amd.com/t5/opencl/whitelist-request-and-a-potential-opencl-driver-problem-with-amd/td-p/492439/highlight/false). A pkg file which could support AMD devices without crash (not fully test, and could not pass all ocl_tests possibily due to tolerance difference for different devices , use at your own risk) can be found here: https://sourceforge.net/u/tangjinchuan/wiki/Can%20I%20use%20AMD%27s%20APUs%20in%20Windows%3F/)Dear...
Promising results with AMD APUs. No more crushes. Matt, please have a look!
(Update: 2021.10.21 With the help of AMD's expert, the problem in the kernel has been located (https://community.amd.com/t5/opencl/whitelist-request-and-a-potential-opencl-driver-problem-with-amd/td-p/492439/highlight/false). A file which could support AMD devices without crush (not fully test, and could not pass all ocl_tests possibily due to tolerance difference for different devices , use at your own risk) can be found here: https://sourceforge.net/u/tangjinchuan/wiki/Can%20I%20use%20AMD%27s%20APUs%20in%20Windows%3F/)Dear...
Dear Matt and the communities in need, I have reported a potential bug with AMD APUs to AMD. With AMD APUs, it seems that it will crash the Octave program when executing any OpenCL related statements like gpuArray. The full detail can be found here: https://community.amd.com/t5/opencl/whitelist-request-and-a-potential-opencl-driver-problem-with-amd/m-p/492558/emcs_t/S2h8ZW1haWx8bWVudGlvbl9zdWJzY3JpcHRpb258S1VNQU8wSjUyT0pYS1l8NDkyNTU4fEFUX01FTlRJT05TfGhL#M1307 And AMD gave a fast response and will...
Hi Matt, I have submit an issue to Microsoft https://github.com/microsoft/OpenCLOn12/issues/30 regarding a problem that produce wrong results for ocl_cat functions. Could you please have a look at it? I guess it is their runtime problem, and ocl_tests will fail when using it. I also created a wiki page to talk about the runtime, this runtime can be installed from MS store directly. https://sourceforge.net/u/tangjinchuan/wiki/I%20heard%20that%20Microsoft%20has%20an%20OpenCL%20implementation%20called%20OpenCL%E2%84%A2%20and%20OpenGL%C2%AE%20Compatibility%20Pack%2C%20should%20I%20use%20it%20%3F/...
I tried to add the support. The code is just for Matt's reference. I used function like cospi sinpi to avoid the radius to degree conversion involving PI for single and double float. If there is some other technical reasons. Matt, please do let me know. From Jinchuan https://sourceforge.net/u/tangjinchuan/octave-ocl-gzu/ci/d2f802e47c84fe3385c9f8b63ed9f072fd6d0353/
extend OCL matrix methods "min" and "max" to case with scalar first argument
upgrade calls to functions deprecated in octave 6
adapt dummy save / load stubs for octave 6
add dummy save / load functionality to OCL variables (to avoid breaking workspace saving / loading)
A(A<0) = 0 is quite normal when implementing a ReLU. But it does not work directly currently. Problem: For an oclArray A, B = A<0 does give correct result. However, A(B)=0 simply would not change anything in A. Meanwhile, !B strangely only inverts 1 to 0, and not 0 to 1. I guess it is related to the backend implementation on octave-ocl or OpenCL in general (Maybe the GPU only support logic A<0.), or the GPU openCL driver. Workaround: A.*(gpuArray(ones(size(A))) – (A<0)) gives the correct result on...
A(A<0) = 0 is quite normal when implementing a ReLU. But it does not work directly currently. Problem: For an oclArray A, B = A<0 does give correct result. However, A(B)=0 simply would not change anything in A. Meanwhile, !B strangely only inverts 1 to 0, and not 0 to 1. I guess it is related to the backend implementation on octave-ocl or OpenCL in general (Maybe the GPU only support logic A<0.), or the GPU openCL driver. Workaround: A.*(gpuArray(ones(size(A))) – (A<0)) gives the correct result on...
As stated in the README and oclArray help text, there are and will be restrictions on built-in operations with OCL matrices. The file ocl_tests.m states what is possible. This having said, "logical indexing" (e.g. expressions like data_matrix(logic_matrix) ) is generally not defined in ocl. The reason for this, as is with most of the mentioned restrictions, is of technical nature: As the octave command C(A<0) would be processed on the CPU, it cannot be known how many elements of C are actually involved...
Thanks for the feedback. The degree-based trigonometric funtions are defined in octave, but not in OpenCL C. Generally, the ocl package is aimed at functions defined in both languages, at least to a certain extent. Internal to octave, there is also no mechanism to link the two languages in an analogous way as the radian-based ("mapping") functions. So, yes, there are (also) technical reasons for this, so please don't build your hopes up.
The degree-based trigonometric funtions are defined in octave, but not in OpenCL C. Generally, the ocl package is aimed at functions defined in both languages, at least to a certain extent. Internal to octave, there is also no mechanism to link the two languages in an analogous way as the radian-based ("mapping") functions. So, yes, there are (also) technical reasons for this, so please don't build your hopes up.
A(A<0) = 0 is quite normal when implementing a ReLU. But it does not work directly currently. Problem: For an oclArray A, B = A<0 does give correct result. However, A(B)=0 simply would not change anything in A. Meanwhile, !B strangely only inverts 1 to 0, and not 0 to 1. I guess it is related to the backend implementation on octave-ocl or OpenCL in general (Maybe the GPU only support logic A<0.), or the GPU openCL driver. Workaround: gpuArray(ones(size(A))) – (A<0) gives the correct result on my...
Update with workaround: Problem: If you declared oclArray variable on your workspace, then it would be problem when you save, e.g., save('A'), the whole workspace with error: octave_base_value::save_ascii(): wrong type argument 'ocl matrix'. This will cause a problem for not all workspace variables are saved. Then, when you load the workspace after a new octave instance. You will have the same error and the problem for some of the variables are missing. Workaround: save your variable of interest...
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="Microsoft Word 15 (filtered medium)" name="Generator"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:DengXian; panose-1:2 1 6 0 3 1 1 1 1 1;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:"\@DengXian"; panose-1:2 1 6 0 3 1 1 1 1 1;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal...
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"><meta content="Microsoft Word 15 (filtered medium)" name="Generator"><style><!-- /* Font Definitions */ @font-face {font-family:"Cambria Math"; panose-1:2 4 5 3 5 4 6 3 2 4;} @font-face {font-family:DengXian; panose-1:2 1 6 0 3 1 1 1 1 1;} @font-face {font-family:Calibri; panose-1:2 15 5 2 2 2 4 3 2 4;} @font-face {font-family:"\@DengXian"; panose-1:2 1 6 0 3 1 1 1 1 1;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal...
Tagged release-1.1.0
DESCRIPTION, NEWS, README: Upgraded package version to 1.1.0
Trigonometry functions in degrees not linked
ocl_tests.m: raised tolerances for numeric tests
remove references to octave's "error_state" variable
adaptions for higher octave versions and complex data
ocl_array.h/cc+ocl_array_prog.cc+ocl_ov_matrix.cc+ocl_ov_matrix_ops.cc: bugfixes for complex data
ocl_tests.m: added tests for complex ocl data
>>> ocl_tests Testing ocl_constant function... Testing ocl_lib function... Testing ocl_context function... fatal: caught signal Segmentation fault -- stopping myself... Segmentation fault (core dumped)
segtaults using octArray
Tagged release-1.0.0
README, NEWS, DESCRIPTION: Upgraded package version to 1.0.0
ocl_ov_types.cc: Added an #include neccessary for octave >= 4.4.0
ocl_ov_matrix_ops.cc, ocl_tests.m: ocl matrix operators now also work with scalars of type double