<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Discussion</title><link href="https://sourceforge.net/p/octave-ocl/discussion/" rel="alternate"/><link href="https://sourceforge.net/p/octave-ocl/discussion/feed.atom" rel="self"/><id>https://sourceforge.net/p/octave-ocl/discussion/</id><updated>2024-04-10T16:11:34.345000Z</updated><subtitle>Recent posts to Discussion</subtitle><entry><title>AMD bugfix 1</title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/bace92ba5e/?limit=25#494a" rel="alternate"/><published>2024-04-10T16:11:34.345000Z</published><updated>2024-04-10T16:11:34.345000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.net46df8f9af71288b661f9806ae61f269a39524b72</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi Matt, &lt;/p&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;p&gt;Best wishes,&lt;br/&gt;
Jinchuan&lt;/p&gt;
&lt;p&gt;In file included from ocl_ov_matrix.h:38,&lt;br/&gt;
                 from ocl_ov_matrix_fcns.cc:37:&lt;br/&gt;
In member function 'OclArray&amp;lt;t&amp;gt;&amp;amp; OclArray&amp;lt;t&amp;gt;::operator=(const OclArray&amp;lt;t&amp;gt;&amp;amp;) &lt;span&gt;[with T = double&lt;br/&gt;
',&lt;br/&gt;
    inlined from 'octave_value_list Focl_linspace(const octave_value_list&amp;amp;, int)' at ocl_ov_m&lt;br/&gt;
atrix_fcns.cc:410:98:&lt;br/&gt;
ocl_array.h:277:9: warning: 'void operator delete(void*, std::size_t)' called on unallocated&lt;br/&gt;
object 'nr' &lt;span&gt;&lt;span&gt;[-Wfree-nonheap-object]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;
  277 |         delete rep;&lt;br/&gt;
      |         ^~~~~~~~~~&lt;br/&gt;
ocl_array.h: In function 'octave_value_list Focl_linspace(const octave_value_list&amp;amp;, int)':&lt;br/&gt;
ocl_array.h:208:46: note: declared here&lt;br/&gt;
  208 |     static typename OclArray&amp;lt;t&amp;gt;::OclArrayRep nr;&lt;br/&gt;
      |                                              ^~&lt;br/&gt;
In member function 'OclArray&amp;lt;t&amp;gt;&amp;amp; OclArray&amp;lt;t&amp;gt;::operator=(const OclArray&amp;lt;t&amp;gt;&amp;amp;) &lt;span&gt;[with T = double&lt;br/&gt;
',&lt;br/&gt;
    inlined from 'octave_value_list Focl_logspace(const octave_value_list&amp;amp;, int)' at ocl_ov_m&lt;br/&gt;
atrix_fcns.cc:460:91:&lt;br/&gt;
ocl_array.h:277:9: warning: 'void operator delete(void*, std::size_t)' called on unallocated&lt;br/&gt;
object 'nr' &lt;span&gt;&lt;span&gt;[-Wfree-nonheap-object]&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br/&gt;
  277 |         delete rep;&lt;br/&gt;
      |         ^~~~~~~~~~&lt;br/&gt;
ocl_array.h: In function 'octave_value_list Focl_logspace(const octave_value_list&amp;amp;, int)':&lt;br/&gt;
ocl_array.h:208:46: note: declared here&lt;br/&gt;
  208 |     static typename OclArray&amp;lt;t&amp;gt;::OclArrayRep nr;&lt;br/&gt;
      |                                              ^~&amp;lt;/t&amp;gt;&amp;lt;/t&amp;gt;&amp;lt;/t&amp;gt;&amp;lt;/t&amp;gt;&amp;lt;/t&amp;gt;&amp;lt;/t&amp;gt;&amp;lt;/t&amp;gt;&amp;lt;/t&amp;gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>A(A&lt;0) = 0 does not work (ReLU) and the workaround.</title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/0095d530d2/?limit=25#54f3/074f" rel="alternate"/><published>2023-04-08T08:22:50.676000Z</published><updated>2023-04-08T08:22:50.676000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.net30e5e44b882f92ffa0e466290e9f5b47ec9dd3ed</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Dear Matt,&lt;/p&gt;
&lt;p&gt;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&amp;lt;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 have nnz implementation on my side and would like to inspire anybody who have time read and have a different thought.&lt;/p&gt;
&lt;p&gt;Best wishes,&lt;br/&gt;
Jinchuan&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CL_DEVICE_HALF_FP_CONFIG is not defined in 1.1/1.2 specification</title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/b9cb796726/?limit=25#2686" rel="alternate"/><published>2022-12-25T15:37:54.311000Z</published><updated>2022-12-25T15:37:54.311000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.net9dea00cdfdceed1232660bc0208b0b1c03cf1999</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Bugs reported to apple via developer discussion:&lt;br/&gt;
&lt;a href="https://discussions.apple.com/thread/254494854." rel="nofollow"&gt;https://discussions.apple.com/thread/254494854.&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CL_DEVICE_HALF_FP_CONFIG is not defined in 1.1/1.2 specification</title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/b9cb796726/?limit=25#f3f3" rel="alternate"/><published>2022-12-25T15:17:48.094000Z</published><updated>2022-12-25T15:17:48.094000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.netab33f6b7aab89f1e20d52d1bb139d1e17c746732</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Dear Matt,&lt;br/&gt;
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. &lt;br/&gt;
//ocl_context.cc&lt;br/&gt;
t2.setfield ("fp_config",            get_device_prop (device, CL_DEVICE_HALF_FP_CONFIG));&lt;/p&gt;
&lt;p&gt;Bad results produced by Mac OS M1:&lt;/p&gt;
&lt;p&gt;ocl: calling OpenCL function 'clGetDeviceInfo'&lt;br/&gt;
  returned error 'CL_INVALID_OPERATION' (-59).&lt;br/&gt;
error: OpenCL function call error&lt;br/&gt;
error: called from&lt;br/&gt;
ocl_tests at line 85 column 11&lt;/p&gt;
&lt;p&gt;Best wishes,&lt;br/&gt;
Jinchuan Tang&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>A potential problem with Microsoft OpenCL™ and OpenGL® Compatibility Pack on DX12 runtime. </title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/b47bc925d3/?limit=25#f1a0" rel="alternate"/><published>2022-11-08T10:09:22.071000Z</published><updated>2022-11-08T10:09:22.071000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.nete1052da96fa561c381695ae55f6f191912e9f3ad</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;After a long time, MS finally confirmed this as a good bug and claimed to fix this problem. &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>FFT, RNG as well as DNN: it’s time to summon volunteers  to join the code base?</title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/de40bd416a/?limit=25#d229" rel="alternate"/><published>2022-05-03T15:55:29.608000Z</published><updated>2022-05-03T15:55:29.608000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.net9d73a8ce1ba0b393b54986218c3e198403b95bc3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Dear Matt and the concerned readers,&lt;br/&gt;
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.&lt;br/&gt;
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 in HR or finantially, that would be even greater.&lt;br/&gt;
Note: I do support not reinventing the wheels but to build the framework based on the latest opensource codes , and add the interfaces to Octave. &lt;/p&gt;
&lt;p&gt;Best wishes,&lt;br/&gt;
Jinchuan Tang&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>A potential problem with Microsoft OpenCL™ and OpenGL® Compatibility Pack on DX12 runtime. </title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/b47bc925d3/?limit=25#d605" rel="alternate"/><published>2022-05-02T14:00:06.353000Z</published><updated>2022-05-02T14:00:06.353000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.net5f910e2e7bea9cb13daafd17a4a99091d6db784e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;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.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>A(A&lt;0) = 0 does not work (ReLU) and the workaround.</title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/0095d530d2/?limit=25#6ae7" rel="alternate"/><published>2022-03-05T15:11:53.484000Z</published><updated>2022-03-05T15:11:53.484000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.net34bd79e8928cc69dd8ce5f5f5d18890ca1909012</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;strong&gt;Regarding Intel Graphic Driver workaround: &lt;br/&gt;
&lt;/strong&gt;&lt;br/&gt;
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&lt;/p&gt;
&lt;p&gt;Best wishes,&lt;br/&gt;
Jinchuan&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>A potential problem with Microsoft OpenCL™ and OpenGL® Compatibility Pack on DX12 runtime. </title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/b47bc925d3/?limit=25#d7c6" rel="alternate"/><published>2021-12-24T16:46:56.110000Z</published><updated>2021-12-24T16:46:56.110000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.netecf39e1d9aafd1ae5e72fa7e14c52342c15285e4</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;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.&lt;br/&gt;
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 mentioned there would be problem if simply send 0/NULL as a kernel argument in some old runtimes, the solution here is let what is similar to "give to Caesar what belongs to Caesar, and give to God what belongs to God.". Simply use a kernels with index input and another one without. &lt;br/&gt;
As a result, the system now can run on OpenCLOn12. This is a great news to some Windows-ARM based system that does not have native OpenCL runtime at the moment but supports Dx12 Interfaces.&lt;br/&gt;
The problem is solved.&lt;br/&gt;
Happy Christmas!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>A potential problem with Microsoft OpenCL™ and OpenGL® Compatibility Pack on DX12 runtime. </title><link href="https://sourceforge.net/p/octave-ocl/discussion/general/thread/b47bc925d3/?limit=25#973c" rel="alternate"/><published>2021-12-23T16:40:30.781000Z</published><updated>2021-12-23T16:40:30.781000Z</updated><author><name>Tang Jinchuan</name><uri>https://sourceforge.net/u/tangjinchuan/</uri></author><id>https://sourceforge.net8ddacb45c16e3601c292de2578e7a081865df1e5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;This one is quite interesting. I now have some clues after testings with different assumptions on ocl_cat. &lt;/p&gt;
&lt;p&gt;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).&lt;/p&gt;
&lt;p&gt;The magic happens when I add clBarrier, clFlush, clFinish one after another to each enqueue inside the for loop, the results now are correct. It's 12:36AM already at my place. I guess I will have a further look at to see if this is the important case or some functions out of thoese three are good enough.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>