{"action":"created","issue":{"url":"https://api.github.com/repos/hughperkins/cltorch/issues/10","labels_url":"https://api.github.com/repos/hughperkins/cltorch/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/hughperkins/cltorch/issues/10/comments","events_url":"https://api.github.com/repos/hughperkins/cltorch/issues/10/events","html_url":"https://github.com/hughperkins/cltorch/issues/10","id":93300980,"number":10,"title":"char-rnn: nans at training ","user":{"login":"xonobo","id":1115812,"avatar_url":"https://avatars.githubusercontent.com/u/1115812?v=3","gravatar_id":"","url":"https://api.github.com/users/xonobo","html_url":"https://github.com/xonobo","followers_url":"https://api.github.com/users/xonobo/followers","following_url":"https://api.github.com/users/xonobo/following{/other_user}","gists_url":"https://api.github.com/users/xonobo/gists{/gist_id}","starred_url":"https://api.github.com/users/xonobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xonobo/subscriptions","organizations_url":"https://api.github.com/users/xonobo/orgs","repos_url":"https://api.github.com/users/xonobo/repos","events_url":"https://api.github.com/users/xonobo/events{/privacy}","received_events_url":"https://api.github.com/users/xonobo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-07-06T15:03:59Z","updated_at":"2015-07-06T15:28:41Z","closed_at":null,"body":"I couldn't run the test routines. I guess they are available in the latest version. But I couldn't updated my cltorch in an offline fashion. That's why reopened the issue #9 .\r\n\r\n--------------------------------\r\nclTorch output:\r\n--------------------------------\r\nth> require('cutorch')\r\n {\r\n streamWaitFor : function: 0x4058b558\r\n deviceReset : function: 0x4058ba98\r\n test : function: 0x409a58f0\r\n _state : userdata: 0x0220bca0\r\n streamSynchronize : function: 0x4058b928\r\n manualSeed : function: 0x4058bf20\r\n setStream : function: 0x4058b2b0\r\n getMemoryUsage : function: 0x4058bcd8\r\n setDefaultStream : function: 0x4058b488\r\n getBlasHandle : function: 0x4058b030\r\n CudaHostAllocator : torch.Allocator\r\n getNumStreams : function: 0x4058b1e0\r\n manualSeedAll : function: 0x4058bfe0\r\n initialSeed : function: 0x4058bec0\r\n getStream : function: 0x4058b370\r\n setRNGState : function: 0x405840b0\r\n setBlasHandle : function: 0x4058af68\r\n seed : function: 0x4058bda0\r\n getDeviceProperties : function: 0x4058bc18\r\n reserveStreams : function: 0x4058b100\r\n withDevice : function: 0x409a5958\r\n setDevice : function: 0x4058bd40\r\n seedAll : function: 0x4058be60\r\n getNumBlasHandles : function: 0x4058af00\r\n getDeviceCount : function: 0x4058bb58\r\n createCudaHostTensor : function: 0x409a5998\r\n getState : function: 0x40584170\r\n getDevice : function: 0x4058b9b0\r\n synchronize : function: 0x4058ad00\r\n getRNGState : function: 0x40584048\r\n streamWaitForMultiDevice : function: 0x4058b650\r\n reserveBlasHandles : function: 0x4058ae30\r\n streamBarrierMultiDevice : function: 0x4058b838\r\n streamBarrier : function: 0x4058b720\r\n }\r\n [1.0545s] \r\n th> require('cltorch')\r\n {\r\n setAddFinish : function: 0x41f1bd90\r\n getDeviceCount : function: 0x41f1bbd8\r\n getDeviceProperties : function: 0x41f1bcc8\r\n getState : function: 0x41f1bcf0\r\n getDevice : function: 0x412c43e0\r\n setDevice : function: 0x412c4440\r\n _state : userdata: 0x02467900\r\n dumpTimings : function: 0x41f1bb28\r\n setTrace : function: 0x41f1bd40\r\n synchronize : function: 0x412c4468\r\n finish : function: 0x41f1bbb0\r\n }\r\n [0.0146s] \r\n th> cltorch.getDeviceProperties(1)\r\n {\r\n deviceType : \"CPU\"\r\n maxClockFrequency : 2000\r\n deviceName : \" Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz\"\r\n maxMemAllocSizeMB : 16089\r\n globalMemCachelineSizeKB : 0\r\n deviceVersion : \"OpenCL 1.2 (Build 43)\"\r\n localMemSizeKB : 32\r\n openClCVersion : \"OpenCL C 1.2 \"\r\n maxWorkGroupSize : 8192\r\n globalMemSizeMB : 64358\r\n platformVendor : \"Intel(R) Corporation\"\r\n maxComputeUnits : 32\r\n }\r\n [0.0011s] \r\n th> cltorch.getDeviceProperties(2)\r\n {\r\n deviceType : \"GPU\"\r\n maxClockFrequency : 705\r\n deviceName : \"Quadro 410\"\r\n maxMemAllocSizeMB : 128\r\n globalMemCachelineSizeKB : 0\r\n deviceVersion : \"OpenCL 1.1 CUDA\"\r\n localMemSizeKB : 47\r\n openClCVersion : \"OpenCL C 1.1 \"\r\n maxWorkGroupSize : 1024\r\n globalMemSizeMB : 509\r\n platformVendor : \"NVIDIA Corporation\"\r\n maxComputeUnits : 1\r\n }\r\n\r\n--------------------------------------------------------------------------------\r\n\r\ntraining on CPU\r\n--------------------------------\r\n\r\nth train.lua -data_dir data/tinyshakespeare/ -opencl 0 -gpuid -1\r\n vocab.t7 and data.t7 do not exist. Running preprocessing... \r\n one-time setup: preprocessing input text file data/tinyshakespeare/input.txt... \r\n loading text file...\r\n\r\n creating vocabulary mapping...\r\n\r\n putting data into tensor... \r\n saving data/tinyshakespeare/vocab.t7\r\n\r\n saving data/tinyshakespeare/data.t7 \r\n loading data files...\r\n\r\n cutting off end of data so that the batches/sequences divide evenly \r\n reshaping tensor... \r\n data load done. Number of data batches in train: 423, val: 23, test: 0\r\n\r\n vocab size: 65\r\n\r\n creating an LSTM with 2 layers\r\n\r\n number of parameters in the model: 240321\r\n\r\n cloning criterion\r\n\r\n cloning rnn \r\n 1/21150 (epoch 0.002), train_loss = 4.19766416, grad/param norm = 4.5006e-01, time/batch = 1.74s\r\n\r\n 2/21150 (epoch 0.005), train_loss = 4.10134056, grad/param norm = 6.3375e-01, time/batch = 2.14s\r\n\r\n 3/21150 (epoch 0.007), train_loss = 3.44502399, grad/param norm = 9.4798e-01, time/batch = 1.48s\r\n\r\n 4/21150 (epoch 0.009), train_loss = 3.45054399, grad/param norm = 1.1340e+00, time/batch = 2.03s\r\n\r\n 5/21150 (epoch 0.012), train_loss = 3.33238818, grad/param norm = 7.8976e-01, time/batch = 1.62s\r\n\r\n 6/21150 (epoch 0.014), train_loss = 3.37363688, grad/param norm = 7.0334e-01, time/batch = 1.61s\r\n\r\n 7/21150 (epoch 0.017), train_loss = 3.36438210, grad/param norm = 6.5300e-01, time/batch = 2.70s\r\n\r\n 8/21150 (epoch 0.019), train_loss = 3.33342581, grad/param norm = 7.6950e-01, time/batch = 1.72s\r\n\r\n 9/21150 (epoch 0.021), train_loss = 3.29173263, grad/param norm = 6.1282e-01, time/batch = 1.79s\r\n\r\n 10/21150 (epoch 0.024), train_loss = 3.38000728, grad/param norm = 4.1881e-01, time/batch = 2.92s \r\n\r\n--------------------------------------------------------------------------------\r\n\r\ntraining on GPU - CUDA\r\n--------------------------------\r\n\r\nth train.lua -data_dir data/tinyshakespeare/ -opencl 0 -gpuid 0\r\n using CUDA on GPU 0...\r\n\r\n loading data files...\r\n\r\n cutting off end of data so that the batches/sequences divide evenly \r\n reshaping tensor... \r\n data load done. Number of data batches in train: 423, val: 23, test: 0\r\n\r\n vocab size: 65\r\n\r\n creating an LSTM with 2 layers\r\n\r\n number of parameters in the model: 240321\r\n\r\n cloning criterion\r\n\r\n cloning rnn \r\n 1/21150 (epoch 0.002), train_loss = 4.16315975, grad/param norm = 4.5507e-01, time/batch = 0.50s\r\n\r\n 2/21150 (epoch 0.005), train_loss = 4.06560737, grad/param norm = 6.1592e-01, time/batch = 0.45s\r\n\r\n 3/21150 (epoch 0.007), train_loss = 3.50594769, grad/param norm = 1.2221e+00, time/batch = 0.45s\r\n\r\n 4/21150 (epoch 0.009), train_loss = 3.45355825, grad/param norm = 1.3675e+00, time/batch = 0.44s\r\n\r\n 5/21150 (epoch 0.012), train_loss = 3.35222242, grad/param norm = 1.2052e+00, time/batch = 0.44s\r\n\r\n 6/21150 (epoch 0.014), train_loss = 3.37636928, grad/param norm = 8.7048e-01, time/batch = 0.44s\r\n\r\n 7/21150 (epoch 0.017), train_loss = 3.36737326, grad/param norm = 6.1815e-01, time/batch = 0.44s\r\n\r\n 8/21150 (epoch 0.019), train_loss = 3.32496874, grad/param norm = 4.2533e-01, time/batch = 0.44s\r\n\r\n 9/21150 (epoch 0.021), train_loss = 3.29095509, grad/param norm = 4.5369e-01, time/batch = 0.44s\r\n\r\n 10/21150 (epoch 0.024), train_loss = 3.38070163, grad/param norm = 4.3267e-01, time/batch = 0.44s\r\n\r\n--------------------------------------------------------------------------------\r\n\r\ntraining on GPU - OPENCL\r\n--------------------------------\r\n\r\nth train.lua -data_dir data/tinyshakespeare/ -opencl 1 -gpuid 1\r\n registering spatialconvolutionmm\r\n using OpenCL on GPU 1...\r\n\r\n loading data files...\r\n\r\n cutting off end of data so that the batches/sequences divide evenly \r\n reshaping tensor... \r\n data load done. Number of data batches in train: 423, val: 23, test: 0\r\n\r\n vocab size: 65\r\n\r\n creating an LSTM with 2 layers\r\n\r\n Using NVIDIA Corporation platform: NVIDIA CUDA\r\n Using device: Quadro 410\r\n statefultimer v0.6\r\n number of parameters in the model: 240321\r\n\r\n cloning criterion\r\n\r\n cloning rnn \r\n 1/21150 (epoch 0.002), train_loss = 4.19766393, grad/param norm = 4.5006e-01, time/batch = 1.31s\r\n\r\n 2/21150 (epoch 0.005), train_loss = 4.10134039, grad/param norm = 6.3375e-01, time/batch = 1.10s\r\n\r\n 3/21150 (epoch 0.007), train_loss = 3.44484827, grad/param norm = 9.4796e-01, time/batch = 1.11s\r\n\r\n 4/21150 (epoch 0.009), train_loss = 3.45040853, grad/param norm = 1.1346e+00, time/batch = 1.10s\r\n\r\n 5/21150 (epoch 0.012), train_loss = 3.33218116, grad/param norm = 7.8938e-01, time/batch = 1.09s\r\n\r\n 6/21150 (epoch 0.014), train_loss = 3.37349831, grad/param norm = 7.0234e-01, time/batch = 1.04s\r\n\r\n 7/21150 (epoch 0.017), train_loss = 3.36418301, grad/param norm = 6.5344e-01, time/batch = 0.96s\r\n\r\n 8/21150 (epoch 0.019), train_loss = 3.33336397, grad/param norm = 7.7021e-01, time/batch = 0.95s\r\n\r\n 9/21150 (epoch 0.021), train_loss = 3.29151368, grad/param norm = 6.1312e-01, time/batch = 0.95s\r\n\r\n 10/21150 (epoch 0.024), train_loss = 3.37983895, grad/param norm = 4.1876e-01, time/batch = 0.95s \r\n\r\n--------------------------------------------------------------------------------\r\n\r\ntraining on CPU - OPENCL\r\n--------------------------------\r\n\r\nth train.lua -data_dir data/tinyshakespeare/ -opencl 1 -gpuid 0\r\n registering spatialconvolutionmm\r\n using OpenCL on GPU 0...\r\n\r\n loading data files...\r\n\r\n cutting off end of data so that the batches/sequences divide evenly \r\n reshaping tensor... \r\n data load done. Number of data batches in train: 423, val: 23, test: 0\r\n\r\n vocab size: 65\r\n\r\n creating an LSTM with 2 layers\r\n\r\n Using Intel(R) Corporation platform: Intel(R) OpenCL\r\n Using device: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz\r\n statefultimer v0.6\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n number of parameters in the model: 240321\r\n\r\n cloning criterion\r\n\r\n cloning rnn \r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (8)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClTensorMathTransformReduce.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClReduce.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n /home/bozkalayci/torch-distro/updates/cltorch/lib/THCl/THClGather.cpp build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClReduceAll.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (8)\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (8)\r\n Done.\r\n /home/bozkalayci/torch-distro/updates/cltorch/lib/THCl/THClScatter.cpp build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClReduceAll.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (8)\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (8)\r\n Done.\r\n THClReduceAll.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (8)\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (8)\r\n Done.\r\n 1/21150 (epoch 0.002), train_loss = nan, grad/param norm = 1.0629e+02, time/batch = 84.92s\r\n\r\n loss is exploding, aborting. \r\n\r\n--------------------------------------------------------------------------------\r\n\r\ntraining on CPU - OPENCL - fork of hughperkins\r\n--------------------------------\r\n\r\nth train.lua -data_dir data/tinyshakespeare/ -opencl 1 -gpuid 0\r\n registering spatialconvolutionmm\r\n using OpenCL on GPU 0...\r\n\r\n loading data files...\r\n\r\n cutting off end of data so that the batches/sequences divide evenly \r\n reshaping tensor... \r\n data load done. Number of data batches in train: 423, val: 23, test: 0\r\n\r\n vocab size: 65\r\n\r\n creating an LSTM with 2 layers\r\n\r\n Using Intel(R) Corporation platform: Intel(R) OpenCL\r\n Using device: Intel(R) Xeon(R) CPU E5-2650 0 @ 2.00GHz\r\n statefultimer v0.6\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n number of parameters in the model: 240321\r\n\r\n cloning criterion\r\n\r\n cloning rnn \r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (8)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClTensorMathTransformReduce.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClReduce.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n /home/bozkalayci/torch-distro/updates/cltorch/lib/THCl/THClGather.cpp build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClReduceAll.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (8)\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (8)\r\n Done.\r\n /home/bozkalayci/torch-distro/updates/cltorch/lib/THCl/THClScatter.cpp build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was not vectorized\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClApply.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (4)\r\n Done.\r\n THClReduceAll.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (8)\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (8)\r\n Done.\r\n THClReduceAll.cl build log: \r\n Compilation started\r\n Compilation done\r\n Linking started\r\n Linking done\r\n Device build started\r\n Device build done\r\n Kernel was successfully vectorized (8)\r\n Kernel was successfully vectorized (4)\r\n Kernel was successfully vectorized (8)\r\n Done.\r\n 1/21150 (epoch 0.002), train_loss = nan, grad/param norm = 1.0629e+02, time/batch = 87.60s\r\n\r\n 2/21150 (epoch 0.005), train_loss = nan, grad/param norm = 1.0279e+02, time/batch = 2.42s\r\n\r\n 3/21150 (epoch 0.007), train_loss = nan, grad/param norm = 9.8932e+01, time/batch = 2.40s\r\n\r\n 4/21150 (epoch 0.009), train_loss = nan, grad/param norm = 9.5078e+01, time/batch = 2.41s\r\n\r\n 5/21150 (epoch 0.012), train_loss = nan, grad/param norm = 9.1377e+01, time/batch = 2.38s\r\n\r\n 6/21150 (epoch 0.014), train_loss = nan, grad/param norm = 8.7885e+01, time/batch = 2.43s\r\n\r\n 7/21150 (epoch 0.017), train_loss = nan, grad/param norm = 8.4618e+01, time/batch = 2.38s\r\n\r\n 8/21150 (epoch 0.019), train_loss = nan, grad/param norm = 8.1572e+01, time/batch = 2.38s\r\n\r\n 9/21150 (epoch 0.021), train_loss = nan, grad/param norm = 7.8735e+01, time/batch = 2.38s\r\n\r\n 10/21150 (epoch 0.024), train_loss = nan, grad/param norm = 7.6093e+01, time/batch = 2.38s\r\n\r\n 11/21150 (epoch 0.026), train_loss = nan, grad/param norm = 7.3629e+01, time/batch = 2.64s\r\n\r\n 12/21150 (epoch 0.028), train_loss = nan, grad/param norm = 7.1329e+01, time/batch = 2.44s\r\n\r\n 13/21150 (epoch 0.031), train_loss = nan, grad/param norm = 6.9178e+01, time/batch = 2.40s\r\n\r\n 14/21150 (epoch 0.033), train_loss = nan, grad/param norm = 6.7162e+01, time/batch = 2.40s\r\n\r\n 15/21150 (epoch 0.035), train_loss = 4.19833310, grad/param norm = 2.8035e-01, time/batch = 2.42s\r\n\r\n 16/21150 (epoch 0.038), train_loss = nan, grad/param norm = 6.5226e+01, time/batch = 2.38s\r\n\r\n 17/21150 (epoch 0.040), train_loss = nan, grad/param norm = 6.3410e+01, time/batch = 2.39s\r\n\r\n 18/21150 (epoch 0.043), train_loss = nan, grad/param norm = 6.1704e+01, time/batch = 2.48s\r\n\r\n 19/21150 (epoch 0.045), train_loss = nan, grad/param norm = 6.0097e+01, time/batch = 2.56s\r\n\r\n 20/21150 (epoch 0.047), train_loss = nan, grad/param norm = 5.8581e+01, time/batch = 2.62s\r\n\r\n 21/21150 (epoch 0.050), train_loss = 4.20001215, grad/param norm = 2.8320e-01, time/batch = 2.57s\r\n\r\n 22/21150 (epoch 0.052), train_loss = nan, grad/param norm = 5.7113e+01, time/batch = 2.43s\r\n\r\n 23/21150 (epoch 0.054), train_loss = nan, grad/param norm = 5.5728e+01, time/batch = 2.40s\r\n\r\n 24/21150 (epoch 0.057), train_loss = nan, grad/param norm = 5.4416e+01, time/batch = 2.38s\r\n\r\n 25/21150 (epoch 0.059), train_loss = nan, grad/param norm = 5.3173e+01, time/batch = 2.37s \r\n"},"comment":{"url":"https://api.github.com/repos/hughperkins/cltorch/issues/comments/118891263","html_url":"https://github.com/hughperkins/cltorch/issues/10#issuecomment-118891263","issue_url":"https://api.github.com/repos/hughperkins/cltorch/issues/10","id":118891263,"user":{"login":"hughperkins","id":123560,"avatar_url":"https://avatars.githubusercontent.com/u/123560?v=3","gravatar_id":"","url":"https://api.github.com/users/hughperkins","html_url":"https://github.com/hughperkins","followers_url":"https://api.github.com/users/hughperkins/followers","following_url":"https://api.github.com/users/hughperkins/following{/other_user}","gists_url":"https://api.github.com/users/hughperkins/gists{/gist_id}","starred_url":"https://api.github.com/users/hughperkins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hughperkins/subscriptions","organizations_url":"https://api.github.com/users/hughperkins/orgs","repos_url":"https://api.github.com/users/hughperkins/repos","events_url":"https://api.github.com/users/hughperkins/events{/privacy}","received_events_url":"https://api.github.com/users/hughperkins/received_events","type":"User","site_admin":false},"created_at":"2015-07-06T15:28:41Z","updated_at":"2015-07-06T15:28:41Z","body":"So, cltorch totally doesnt support using the CPU bit of a CPU on OpenCL.  A couple of reasons for this:\r\n- first is that torch already handles cpu training, and it's probably quite well optimized for that\r\n- second is that cltorch is highly optimized for gpus.  The patterns of data access and so on will work incredibly poorly on the cpu bit of cpus\r\n\r\nTechnically, it's probably technically possible to get cltorch to work on CPUs but the amount of work required would be phenomenal, and it would still probably be slower than just using standard cpu-based torch."}}