Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tugrul512bit/Cekirdekler
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.3
Choose a base ref
...
head repository: tugrul512bit/Cekirdekler
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref

Commits on Jun 16, 2017

  1. Copy the full SHA
    ac77601 View commit details
  2. Copy the full SHA
    fafef49 View commit details
  3. 64-bit binaries for lazy developers. Reference cekirdekler.dll in pro…

    …ject, keep kutuphanecl.dll near executable. System.threading.dll is optional for dot-net-2.0.
    tugrul512bit authored Jun 16, 2017
    Copy the full SHA
    65d24ce View commit details
  4. Copy the full SHA
    3dc8f44 View commit details
  5. Copy the full SHA
    9333e43 View commit details
  6. Copy the full SHA
    3959b6f View commit details
  7. Copy the full SHA
    05f216c View commit details
  8. 64-bit binaries for lazy developers. Reference cekirdekler.dll in pro…

    …jects and keep kutuphanecl.dll near executables. System.threading.dll is optional for dot-net-2.0
    tugrul512bit authored Jun 16, 2017
    Copy the full SHA
    eede1af View commit details
  9. Copy the full SHA
    164ca59 View commit details

Commits on Jun 17, 2017

  1. pool optimization

    tugrul512bit committed Jun 17, 2017
    Copy the full SHA
    caa15eb View commit details
  2. Copy the full SHA
    10c47b5 View commit details
  3. optimized pool v25

    tugrul512bit committed Jun 17, 2017
    Copy the full SHA
    1262b77 View commit details
  4. optimize pool v26

    tugrul512bit committed Jun 17, 2017
    Copy the full SHA
    6ada0ef View commit details
  5. Copy the full SHA
    5f2fe3c View commit details
  6. 64-bit binaries for lazy developers. Reference cekirdekler.dll in pro…

    …jects, keep kutuphanecl.dll near executables. System.threading.dll is optional for dot-net-2.0.
    tugrul512bit authored Jun 17, 2017
    Copy the full SHA
    27c6afc View commit details
  7. Copy the full SHA
    ec23af5 View commit details

Commits on Jun 18, 2017

  1. Update README.md

    tugrul512bit authored Jun 18, 2017
    Copy the full SHA
    9a720f2 View commit details

Commits on Jul 2, 2017

  1. Copy the full SHA
    b524110 View commit details
  2. Copy the full SHA
    e1043b5 View commit details
  3. 64-bit binaries for lazy developers. Reference cekirdekler.dll in pro…

    …jects, keep kutuphanecl.dll near executables, system.threading.dll is optional. Rename kutuphanecl2.dll to kutuphanecl2.dll for using opencl2.0
    tugrul512bit authored Jul 2, 2017
    Copy the full SHA
    d969e77 View commit details
  4. Update README.md

    tugrul512bit authored Jul 2, 2017
    Copy the full SHA
    22aac06 View commit details
  5. Copy the full SHA
    0dafe64 View commit details
  6. Copy the full SHA
    4aef2da View commit details
  7. 64-bit binaries for lazy developers. Reference cekirdekler.dll. Keep …

    …kutuphanecl.dll near project executable. System.threading.dll is optional for dot-net-2.0. rename kutuphanecl2.dll to kutuphanecl.dll to use opencl2.0.
    tugrul512bit authored Jul 2, 2017
    Copy the full SHA
    3013fe3 View commit details
  8. Copy the full SHA
    f987445 View commit details
  9. Copy the full SHA
    71adaa4 View commit details
  10. Copy the full SHA
    0a6e2d5 View commit details
  11. Copy the full SHA
    4a38241 View commit details
  12. 64-binaries. Reference cekirdekler.dll in project. Keep kutuphanecl.d…

    …ll near executable. System.threading.dll is optional for dot-net-2.0. kutuphanecl2.dll must be renamed to original(for use) if opencl 2.0 is needed.
    tugrul512bit authored Jul 2, 2017
    Copy the full SHA
    375371e View commit details
  13. Copy the full SHA
    e570940 View commit details
  14. Copy the full SHA
    854d644 View commit details

Commits on Jul 4, 2017

  1. Copy the full SHA
    e34c3cd View commit details

Commits on Oct 16, 2017

  1. Fixed device pool dispose method for case when number of devices is 1…

    …0(5 physical + 5 logical copies, for example)
    tugrul512bit committed Oct 16, 2017
    Copy the full SHA
    f0af574 View commit details
  2. Copy the full SHA
    ae56f16 View commit details
  3. compiled as 64-bit for lazy developers. reference cekirdekler.dll in …

    …your project. keep kutuphanecl.dll near the executable.
    
    system.thread.dll is optional for dot-net-2.0 or earlier.  
    if you need dynamic parallelism(opencl 2.0), then rename kutuphanecl2.dll to kutuphanecl.dll and remove other dll that has same name.
    This version has fixed version of device-pool dispose() method that used to have persistent threads when number of devices are high.
    tugrul512bit authored Oct 16, 2017
    Copy the full SHA
    bc05d5e View commit details
  4. compiled as 64-bit for lazy developers. reference cekirdekler.dll in …

    …your project. keep kutuphancl.dll near executable.
    
    system.thread.dll is optional only for dot-net-2.0 or earlier.
    kutuphanecl.dll is only for opencl-2.0.
    device-pool dispose() method has been fixed(it used to fail(not release worker threads) when number of devices are high)
    tugrul512bit authored Oct 16, 2017
    Copy the full SHA
    fd63998 View commit details

Commits on Nov 6, 2017

  1. Update README.md

    tugrul512bit authored Nov 6, 2017
    Copy the full SHA
    7c1f8e2 View commit details

Commits on Nov 7, 2017

  1. Copy the full SHA
    f9d8efa View commit details

Commits on Nov 17, 2017

  1. flushLastUsedCommandQueue() added to numberCruncher for finer grained…

    … command issue for some graphics cards that need explicit flush() on last used command queue
    tugrul512bit committed Nov 17, 2017
    Copy the full SHA
    d0878bc View commit details
  2. Copy the full SHA
    2a19944 View commit details
  3. Copy the full SHA
    3efebd5 View commit details

Commits on Feb 9, 2018

  1. Update README.md

    tugrul512bit authored Feb 9, 2018
    Copy the full SHA
    3bc614d View commit details

Commits on Jul 7, 2022

  1. Update README.md

    tugrul512bit authored Jul 7, 2022
    Copy the full SHA
    732ea06 View commit details
27 changes: 25 additions & 2 deletions Cekirdekler/Cekirdekler/ClCommandQueue.cs
Original file line number Diff line number Diff line change
@@ -31,6 +31,9 @@ internal class ClCommandQueue
[DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr createCommandQueue(IntPtr hContext, IntPtr hDevice, int async);

[DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr createCommandQueue2(IntPtr hContext, IntPtr hDevice, int async,bool defaultQueue);

[DllImport("KutuphaneCL", CallingConvention = CallingConvention.Cdecl)]
private static extern void addMarkerToCommandQueue(IntPtr hCommandQueue);

@@ -51,12 +54,32 @@ internal class ClCommandQueue
/// creates a command queue in a context
/// </summary>
/// <param name="context"></param>
/// <param name="defaultQueue">OpenCL 2.0 dynamic parallelism queue</param>
/// <param name="async">async!=0 means out-of-order command queue</param>
public ClCommandQueue(ClContext context, int async=0)
public ClCommandQueue(ClContext context, bool defaultQueue, int async=0)
{
hContext = context.h();
hDevice = context.hd();
hCommandQueue = createCommandQueue(hContext, hDevice,async);
if (defaultQueue)
{
try
{
hCommandQueue = createCommandQueue2(hContext, hDevice, async, defaultQueue);
}
catch(EntryPointNotFoundException epnfe)
{
Console.WriteLine("Error: KutuphaneCL.dll's OpenCL2.0 dynamic parallelism support(needs v1.4.1+) not found.");
Console.WriteLine(epnfe.Message);
}
finally
{

}
}
else
{
hCommandQueue = createCommandQueue(hContext, hDevice, async);
}
addedMarkers = 0;
}

2 changes: 1 addition & 1 deletion Cekirdekler/Cekirdekler/ClCruncherServerThread.cs
Original file line number Diff line number Diff line change
@@ -122,7 +122,7 @@ private void f(TcpListener listener, TcpClient client_)
int MAX_CPU = ((int[])arrays[6].backingArray)[0];
openclSystemToCrunchNumbers = new Cores(
deviceTypes, kernelsString,
kernelNamesStringArray, localRAnge,
kernelNamesStringArray,false, localRAnge,
numberOfGPUsToUse, GPU_STREAM,
MAX_CPU);
if(openclSystemToCrunchNumbers.errorCode()!=0)
23 changes: 21 additions & 2 deletions Cekirdekler/Cekirdekler/ClNumberCruncher.cs
Original file line number Diff line number Diff line change
@@ -92,6 +92,19 @@ internal void flush()
}
}

/// <summary>
/// for a more fine-grained host control with enqueue mode,
/// this can be used as a forced command issue to device
/// that flushes last used command queue
/// </summary>
public void flushLastUsedCommandQueue()
{
if (numberCruncher != null)
{
ClObject.Worker.flush(numberCruncher.lastUsedCommandQueueOfFirstDevice().h());
}
}

/// <summary>
/// <para>only for single gpu(or device to device pipeline stages)</para>
/// <para>used by enqueueMode to distribute each compute job to a different queue or not</para>
@@ -187,6 +200,9 @@ public ClNumberCruncher(AcceleratorType cpuGpu, string kernelString,
int numberofCPUCoresToUseAsDeviceFission = -1,
int numberOfGPUsToUse = -1, bool stream = true, bool noPipelining=false)
{
bool defaultQueue = false;
if (kernelString.Contains("enqueue_kernel("))
defaultQueue = true;
repeatCount = 1;
numberOfErrorsHappened = 0;
StringBuilder cpuGpu_ = new StringBuilder("");
@@ -216,7 +232,7 @@ public ClNumberCruncher(AcceleratorType cpuGpu, string kernelString,
errorNotification = 1;
return;
}
numberCruncher = new Cores(cpuGpu_.ToString(), kernelString, kernelNames_.ToArray(), 256,
numberCruncher = new Cores(cpuGpu_.ToString(), kernelString, kernelNames_.ToArray(), defaultQueue, 256,
numberOfGPUsToUse, stream, numberofCPUCoresToUseAsDeviceFission, noPipelining);
if (numberCruncher.errorCode() != 0)
{
@@ -296,6 +312,9 @@ public string[] deviceNames()
/// <param name="computeQueueConcurrency">max number of command queues to send commands asynchronously, max=16, min=1</param>
public ClNumberCruncher(ClDevices devicesForGPGPU, string kernelString,bool noPipelining=false,int computeQueueConcurrency=16)
{
bool defaultQueue = false;
if (kernelString.Contains("enqueue_kernel"))
defaultQueue = true;
repeatCount = 1;
numberOfErrorsHappened = 0;
List<string> kernelNames_ = new List<string>();
@@ -317,7 +336,7 @@ public ClNumberCruncher(ClDevices devicesForGPGPU, string kernelString,bool noPi
errorNotification = 1;
return;
}
numberCruncher = new Cores(devicesForGPGPU, kernelString, kernelNames_.ToArray(), computeQueueConcurrency, noPipelining);
numberCruncher = new Cores(devicesForGPGPU, kernelString, kernelNames_.ToArray(), defaultQueue, computeQueueConcurrency, noPipelining);
if (numberCruncher.errorCode() != 0)
{
errorMessage_ = numberCruncher.errorMessage();
Loading