diff options
author | Sam Gross <sgross@fb.com> | 2015-04-29 21:24:17 +0300 |
---|---|---|
committer | Sam Gross <sgross@fb.com> | 2015-04-29 21:38:27 +0300 |
commit | f30fc341f72ffa4fbf6af6a18fac8c81f0cecf90 (patch) | |
tree | 5e7a1e0803e711825c32ab164cb3fcb75c63320d /init.lua | |
parent | 48eb1c5a3397fb6929ac59f805299a9d56c22903 (diff) |
Lua 5.2 compatibility
Diffstat (limited to 'init.lua')
-rw-r--r-- | init.lua | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -8,6 +8,8 @@ include('Tensor.lua') include('FFI.lua') include('test.lua') +local unpack = unpack or table.unpack + function cutorch.withDevice(newDeviceID, closure) local curDeviceID = cutorch.getDevice() cutorch.setDevice(newDeviceID) |