Skip to content

Instantly share code, notes, and snippets.

@aokomoriuta
aokomoriuta / 倍精度.txt
Created August 21, 2012 02:25
OpenCLでベクトル和を高速化するには1
https://github.com/aokomoriuta/StudiesOfOpenCLWithCloo/tree/master/VectorAddition/HeavyWorkItem の倍精度での結果。
単精度と同じでした(処理量変えても早くならない)。
= ベクトル加算の試験 =
1ワークアイテムの処理量を変えてみる
プラットフォーム:NVIDIA CUDA (OpenCL 1.1 CUDA 4.1.1)
デバイス数:2
* GeForce GTX 295 (NVIDIA Corporation)
* GeForce GTX 295 (NVIDIA Corporation)
@aokomoriuta
aokomoriuta / 倍精度.txt
Created August 30, 2012 02:06
OpenCLでベクトル和を高速化するには2
https://github.com/aokomoriuta/StudiesOfOpenCLWithCloo/tree/master/VectorAddition/MultiGpu の倍精度版。
倍精度にすると更に速い(単一CPUに比べてx6)。
あれ?倍精度演算のほうが計算速度遅いんじゃないの、と思ったが、たぶんメモリ律速のせい。
= ベクトル加算の試験 =
複数GPUを使う
プラットフォーム:NVIDIA CUDA (OpenCL 1.1 CUDA 4.1.1)
デバイス数:2
@aokomoriuta
aokomoriuta / 倍精度.txt
Created August 30, 2012 03:16
OpenCLでベクトル和を高速化するには3
https://github.com/aokomoriuta/StudiesOfOpenCLWithCloo/tree/master/VectorAddition/UseHostPointer の倍精度の結果
単精度と傾向は同じ。
ただしやはり加速率は倍精度のほうが上。
= ベクトル加算の試験 =
ホストポインタの使用有無での比較
プラットフォーム:NVIDIA CUDA (OpenCL 1.1 CUDA 4.1.1)
デバイス数:2
@aokomoriuta
aokomoriuta / Length2.cpp
Created December 6, 2012 08:14
thrustで3引数以上のtransformを実行する方法 ref: http://qiita.com/items/5f595c25c22d160fa0d0
#include<iostream>
// 2次元ベクトルCPU
void Length2()
{
// 要素数
const int N = 5;
// x, y方向成分
double x[N] = {0, 1, 2, 3, 4};
@aokomoriuta
aokomoriuta / ReplaceFile.ps1
Created February 20, 2013 13:58
PowerShellでファイル名を複雑なパターンで置換する方法 ref: http://qiita.com/items/e475a321c5c5b283ce40
# カレントディレクトリに移動
cd "対象ディレクトリ";
# 各ファイルに対して操作
Get-ChildItem | ForEach-Object
{
# ファイル名を'-'で区切ってみたり
$data = $_.Name.Split('-');
# ファイル名が"H"で始まってたら除外したり
Parallel.For(0, 200, i=>
{
result[i] = 0;
for(int j = 0; j<200; j++)
{
result[i] += Math.Sqrt(Math.Sin(i + j));
}
});
@aokomoriuta
aokomoriuta / cuda.log
Last active December 21, 2015 05:18
ViennaCL http://viennacl.sourceforge.net/ のblas3ベンチマーク https://github.com/viennacl/viennacl-dev/blob/master/examples/benchmarks/blas3.cpp (密行列×密行列)をGeForce Titanで走らせてみた結果、CUDAよりOpenCLの方が速いことが分かった
----------------------------------------------
Device Info
----------------------------------------------
----------------------------------------------
----------------------------------------------
## Benchmark :: Dense Matrix-Matrix product
----------------------------------------------
-------------------------------
@aokomoriuta
aokomoriuta / particles.txt
Created November 5, 2013 13:22
OpenMPS( 52ade37cd1b901d561da7644ea9f7b03698f1f9e 時点)での計算速度計測結果
1410 particles
8 threads
#00000: t= 0.0000 (00000) @ 11/04 21:31:23 ( 0.00)
#00001: t= 0.0010 (00002) @ 11/04 21:31:25 ( 1.57)
2460 particles
8 threads
#00000: t= 0.0000 (00000) @ 11/04 21:30:26 ( 0.00)
#00001: t= 0.0010 (00002) @ 11/04 21:30:29 ( 3.21)
@aokomoriuta
aokomoriuta / MsMpiBoost.cpp
Created November 25, 2013 03:47
Windows(Visual Studio 2012)上でboost::MPIで並列計算できるようになるまで ref: http://qiita.com/aokomoriuta/items/cecaf3d5a3258606323b
#define MSMPI_NO_DEPRECATE_20
#include <iostream>
#include <boost/mpi.hpp>
int main()
{
// MPI環境(MPI_InitとFinalizeをやってくれる)
boost::mpi::environment env(true);
@aokomoriuta
aokomoriuta / apu.txt
Last active August 29, 2015 14:01
profile of my computer with APU
===================================================
GPU Caps Viewer v1.20.1.1
http://www.ozone3d.net/gpu_caps_viewer/
===================================================
===================================[ System / CPU ]
- CPU Name: AMD A10-7850K Radeon R7, 12 Compute Cores 4C+8G
- CPU Core Speed: 3718 MHz
- CPU logical cores: 4