Skip to content

Commit

Permalink
Upgrade LuaJIT and restore the full cconv_array.t test on macOS M1 (#642
Browse files Browse the repository at this point in the history
)
  • Loading branch information
elliottslaughter committed Aug 30, 2023
1 parent 5d8703b commit 2cc1cd9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 18 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased Changes (Intended to be Version 1.2.0)

## Fixed Bugs

* Updated LuaJIT to obtain fix for passing large arrays on macOS M1

## Removed features

* Removed support for LLVM <= 10
Expand Down
8 changes: 4 additions & 4 deletions cmake/Modules/GetLuaJIT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ if(TERRA_LUA STREQUAL "luajit")
set(LUAJIT_BASE "luajit")
set(LUAJIT_VERSION_MAJOR 2)
set(LUAJIT_VERSION_MINOR 1)
set(LUAJIT_VERSION_PATCH 0)
set(LUAJIT_VERSION_EXTRA -beta3)
set(LUAJIT_COMMIT "50936d784474747b4569d988767f1b5bab8bb6d0")
set(LUAJIT_HASH_SHA256 "4d44e4709130b031c1c2c81cf5c102dfce877bf454409dabba03249e18870e66")
set(LUAJIT_VERSION_PATCH 1693268511)
set(LUAJIT_VERSION_EXTRA "")
set(LUAJIT_COMMIT "83954100dba9fc0cf5eeaf122f007df35ec9a604") # 2023-08-28
set(LUAJIT_HASH_SHA256 "99b47959c953200e865f1d55dcbb19f887b1d6fc92b9d73192114115c62a7ac6")
if(NOT LUAJIT_VERSION_COMMIT STREQUAL "")
set(LUAJIT_URL_PREFIX "https://github.com/LuaJIT/LuaJIT/archive/")
else()
Expand Down
4 changes: 2 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ let
cudaPackages.cuda_cudart
];

luajitRev = "50936d784474747b4569d988767f1b5bab8bb6d0";
luajitRev = "83954100dba9fc0cf5eeaf122f007df35ec9a604";
luajitBase = "LuaJIT-${luajitRev}";
luajitArchive = "${luajitBase}.tar.gz";
luajitSrc = fetchFromGitHub {
owner = "LuaJIT";
repo = "LuaJIT";
rev = luajitRev;
sha256 = "1g87pl014b5v6z2nnhiwn3wf405skawszfr5wdzyfbx00j3kgxd0";
sha256 = "1m0wpfchljbi0d3x4nzfi1rz8d1viacj6kyqlz034x7nrnazmm1g";
};
llvmMerged = symlinkJoin {
name = "llvmClangMerged";
Expand Down
13 changes: 1 addition & 12 deletions tests/cconv_array.t
Original file line number Diff line number Diff line change
Expand Up @@ -61,22 +61,11 @@ local function run_test_case(typ, N)
end

local MAX_N_INT8 = 11
local MAX_N_SMALL = 32
local ffi = require('ffi')
if ffi.os == 'OSX' and ffi.arch == 'arm64' then
MAX_N_INT8 = 8 -- https://github.com/terralang/terra/issues/604
MAX_N_SMALL = 8 -- https://github.com/terralang/terra/issues/604
end

for N = 0, MAX_N_INT8 do
run_test_case(int8, N)
end
for _, typ in ipairs({int16, int32, float}) do
for N = 0, MAX_N_SMALL do
run_test_case(typ, N)
end
end
for _, typ in ipairs({int64, double}) do
for _, typ in ipairs({int16, int32, int64, float, double}) do
for N = 0, 32 do
run_test_case(typ, N)
end
Expand Down

0 comments on commit 2cc1cd9

Please sign in to comment.