From d21acfb6429cadd1c5afc1120980321aad934a3d Mon Sep 17 00:00:00 2001 From: David Kelley Date: Sat, 19 Mar 2016 10:37:54 -0400 Subject: [PATCH 1/2] float16 --- luasrc/ffi.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luasrc/ffi.lua b/luasrc/ffi.lua index 6b2d199..5c7d84c 100644 --- a/luasrc/ffi.lua +++ b/luasrc/ffi.lua @@ -323,7 +323,7 @@ function hdf5._getTorchType(typeID) end error("Cannot support reading integer data with size = " .. size .. " bytes") elseif className == 'FLOAT' then - if size == 4 then + if size == 2 or size == 4 then return 'torch.FloatTensor' end if size == 8 then From e638817c2ee638a04871b92d5a7564d296142b1d Mon Sep 17 00:00:00 2001 From: David Kelley Date: Sun, 6 Nov 2016 20:07:06 -0800 Subject: [PATCH 2/2] macos sierra bug --- luasrc/ffi.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/luasrc/ffi.lua b/luasrc/ffi.lua index 5c7d84c..13f3bbf 100644 --- a/luasrc/ffi.lua +++ b/luasrc/ffi.lua @@ -41,7 +41,7 @@ local function loadHDF5Header(includePath) if not path.isfile(headerPath) then error("Error: unable to locate HDF5 header file at " .. headerPath) end - local process = io.popen("gcc -E " .. headerPath) -- TODO pass -I + local process = io.popen("gcc -D '_Nullable=' -E " .. headerPath) -- TODO pass -I local contents = process:read("*all") process:close()