Skip to content

Instantly share code, notes, and snippets.

@inferrna
inferrna / bitonic_b.py
Last active August 29, 2015 14:24
opencl (pyopencl) bitonic sorter based on http://www.bealto.com/gpu-sorting_intro.html by Eric Bainville
__copyright__ = """
Copyright (c) 2011, Eric Bainville
Copyright (c) 2015, Ilya Efimoff
All rights reserved.
"""
__license__ = """
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
@inferrna
inferrna / leaktest.c
Created August 26, 2015 02:27
leak test
// File: hello.c
//
// Abstract: A simple "Hello World" compute example showing basic usage of OpenCL which
// calculates the mathematical square (X[i] = pow(X[i],2)) for a buffer of
// floating point values.
//
//
// Version: <1.0>
//
// Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Inc. ("Apple")
@inferrna
inferrna / gist:f183896a683ba773e3b4
Created October 17, 2015 23:36
clinfo_18.10.2015
Number of platforms: 1
Platform Profile: FULL_PROFILE
Platform Version: OpenCL 2.0 AMD-APP (1800.11)
Platform Name: AMD Accelerated Parallel Processing
Platform Vendor: Advanced Micro Devices, Inc.
Platform Extensions: cl_khr_icd cl_amd_event_callback cl_amd_offline_devices
Platform Name: AMD Accelerated Parallel Processing
Number of devices: 3
$ staging/test-short --gtest_filter=RowMajor_SmallRange/GEMM.sgemm/0
Initialize OpenCL and clblas...
---- Intel
SetUp: about to create command queues
Test environment:
Device name: Intel(R) HD Graphics Haswell Ultrabook GT2 Mobile
Device vendor: Intel
Platform (bit): Linux
Number of platforms 2
Platform Name Intel(R) OpenCL
Platform Vendor Intel(R) Corporation
Platform Version OpenCL 1.2 LINUX
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_icd 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_byte_addressable_store cl_khr_depth_images cl_khr_3d_image_writes cl_intel_exec_by_local_thread cl_khr_spir cl_khr_fp64
Platform Extensions function suffix INTEL
Platform Name Portable Computing Language
Platform Vendor The pocl project
# Usage: python3.5 -i convert2lmdb.py train_samples test_samples /tmp/data.npy /tmp/result.npy trainsin_lmdb testsin_lmdb
# Example: python3.5 -i convert2lmdb.py 1000 -1 /tmp/data.npy /tmp/result.npy trainsin_lmdb testsin_lmdb
import numpy as np
import lmdb
import caffe
import sys
def np2lmdb(fname, arr):
diff --git a/include/core_api/imagefilm.h b/include/core_api/imagefilm.h
index 445883f..afe5e4d 100644
--- a/include/core_api/imagefilm.h
+++ b/include/core_api/imagefilm.h
@@ -148,6 +148,7 @@ class YAFRAYCORE_EXPORT imageFilm_t
protected:
rgba2DImage_t *image; //!< rgba color buffer
+ rgba2DImage_t *lastimage; //!< rgba color buffer
gray2DImage_t *depthMap; //!< storage for z-buffer channel
@inferrna
inferrna / client.go
Created October 24, 2016 08:33 — forked from spikebike/client.go
TLS server and client
package main
import (
"crypto/tls"
"crypto/x509"
"fmt"
"io"
"log"
)
============================= test session starts ==============================
platform linux -- Python 3.5.2, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python3
cachedir: .cache
rootdir: /media/Compressed/Drivers_bios/src/dev/tensorflow-cl/third_party/cuda-on-cl, inifile: pytest.ini
collecting ... collected 2132 items
test/test_addressspace.py::test_getelementptr_struct_local PASSED
test/test_addressspace.py::test_getelementptr_struct_global PASSED
test/test_alloca.py::test_alloca PASSED
test/test_branching.py::test_test_if PASSED
@inferrna
inferrna / out.py
Last active November 28, 2016 16:35
$ OFFSET32_BIT=1 CLANG_HOME=/usr/lib/llvm-3.8 py.test -svx test/test_compile.py -k pointerpointer.cu-myte6kernel
======================================================================== test session starts =========================================================================
platform linux -- Python 3.5.2, pytest-2.9.1, py-1.4.31, pluggy-0.3.1 -- /usr/bin/python3
cachedir: .cache
rootdir: /media/Compressed/Drivers_bios/src/dev/tensorflow-cl/third_party/cuda-on-cl, inifile: pytest.ini
collecting 0 itemsmarking xfail
marking xfail
marking xfail
marking xfail
collected 9 items