diff --git a/.githash b/.githash index b3b87b3a..3ba162de 100644 --- a/.githash +++ b/.githash @@ -1 +1 @@ -321fb12e0f01f8fb792cb0a49ff877bb6502ad7d +d2cad4e9f92ba5a786fd167f585882eb109fbb3d diff --git a/lib/cunumeric_jl_wrapper/include/accessors.h b/lib/cunumeric_jl_wrapper/include/accessors.h index 49a5c399..baf27c6a 100644 --- a/lib/cunumeric_jl_wrapper/include/accessors.h +++ b/lib/cunumeric_jl_wrapper/include/accessors.h @@ -1,4 +1,4 @@ -/* Copyright 2025 Northwestern University, +/* Copyright 2026 Northwestern University, * Carnegie Mellon University University * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,7 @@ * * Author(s): David Krasowska * Ethan Meitz + * Nader Rahhal */ #pragma once diff --git a/lib/cunumeric_jl_wrapper/include/ndarray_c_api.h b/lib/cunumeric_jl_wrapper/include/ndarray_c_api.h index b51825a7..c0809652 100644 --- a/lib/cunumeric_jl_wrapper/include/ndarray_c_api.h +++ b/lib/cunumeric_jl_wrapper/include/ndarray_c_api.h @@ -1,3 +1,23 @@ +/* Copyright 2026 Northwestern University, + * Carnegie Mellon University University + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author(s): David Krasowska + * Ethan Meitz + * Nader Rahhal + */ + #ifndef NDARRAY_C_API_H #define NDARRAY_C_API_H diff --git a/lib/cunumeric_jl_wrapper/include/types.h b/lib/cunumeric_jl_wrapper/include/types.h index 10faed01..600b6ec4 100644 --- a/lib/cunumeric_jl_wrapper/include/types.h +++ b/lib/cunumeric_jl_wrapper/include/types.h @@ -1,4 +1,4 @@ -/* Copyright 2025 Northwestern University, +/* Copyright 2026 Northwestern University, * Carnegie Mellon University University * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,7 @@ * * Author(s): David Krasowska * Ethan Meitz + * Nader Rahhal */ #pragma once diff --git a/lib/cunumeric_jl_wrapper/include/ufi.h b/lib/cunumeric_jl_wrapper/include/ufi.h index 1400f706..f5558c16 100644 --- a/lib/cunumeric_jl_wrapper/include/ufi.h +++ b/lib/cunumeric_jl_wrapper/include/ufi.h @@ -1,4 +1,4 @@ -/* Copyright 2025 Northwestern University, +/* Copyright 2026 Northwestern University, * Carnegie Mellon University University * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,7 @@ * * Author(s): David Krasowska * Ethan Meitz + * Nader Rahhal */ #pragma once diff --git a/lib/cunumeric_jl_wrapper/src/cuda.cpp b/lib/cunumeric_jl_wrapper/src/cuda.cpp index 718d2cf6..4d5256bf 100644 --- a/lib/cunumeric_jl_wrapper/src/cuda.cpp +++ b/lib/cunumeric_jl_wrapper/src/cuda.cpp @@ -1,4 +1,4 @@ -/* Copyright 2025 Northwestern University, +/* Copyright 2026 Northwestern University, * Carnegie Mellon University University * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,7 @@ * * Author(s): David Krasowska * Ethan Meitz + * Nader Rahhal */ #include "cuda.h" diff --git a/lib/cunumeric_jl_wrapper/src/memory.cpp b/lib/cunumeric_jl_wrapper/src/memory.cpp index 65d42179..3e346977 100644 --- a/lib/cunumeric_jl_wrapper/src/memory.cpp +++ b/lib/cunumeric_jl_wrapper/src/memory.cpp @@ -1,3 +1,23 @@ +/* Copyright 2026 Northwestern University, + * Carnegie Mellon University University + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author(s): David Krasowska + * Ethan Meitz + * Nader Rahhal + */ + #include #include #include diff --git a/lib/cunumeric_jl_wrapper/src/ndarray.cpp b/lib/cunumeric_jl_wrapper/src/ndarray.cpp index fcd35dd7..c479e4ed 100644 --- a/lib/cunumeric_jl_wrapper/src/ndarray.cpp +++ b/lib/cunumeric_jl_wrapper/src/ndarray.cpp @@ -1,3 +1,23 @@ +/* Copyright 2026 Northwestern University, + * Carnegie Mellon University University + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * Author(s): David Krasowska + * Ethan Meitz + * Nader Rahhal + */ + #include #include #include diff --git a/lib/cunumeric_jl_wrapper/src/types.cpp b/lib/cunumeric_jl_wrapper/src/types.cpp index aee4431c..940aa5d7 100644 --- a/lib/cunumeric_jl_wrapper/src/types.cpp +++ b/lib/cunumeric_jl_wrapper/src/types.cpp @@ -1,4 +1,4 @@ -/* Copyright 2025 Northwestern University, +/* Copyright 2026 Northwestern University, * Carnegie Mellon University University * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/lib/cunumeric_jl_wrapper/src/wrapper.cpp b/lib/cunumeric_jl_wrapper/src/wrapper.cpp index 39ac459e..91673699 100644 --- a/lib/cunumeric_jl_wrapper/src/wrapper.cpp +++ b/lib/cunumeric_jl_wrapper/src/wrapper.cpp @@ -1,4 +1,4 @@ -/* Copyright 2025 Northwestern University, +/* Copyright 2026 Northwestern University, * Carnegie Mellon University University * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,7 @@ * * Author(s): David Krasowska * Ethan Meitz + * Nader Rahhal */ #include @@ -92,6 +93,10 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { using jlcxx::Parametric; using jlcxx::TypeVar; + // Map C++ complex types to Julia complex types + mod.map_type>("ComplexF64"); + mod.map_type>("ComplexF32"); + // These are the types/dims used to generate templated functions // i.e. only these types/dims can be used from Julia side using fp_types = ParameterList; @@ -100,7 +105,8 @@ JLCXX_MODULE define_julia_module(jlcxx::Module& mod) { using all_types = ParameterList; + uint16_t, uint32_t, uint64_t, bool, std::complex, + std::complex>; using allowed_dims = ParameterList< std::integral_constant, std::integral_constant, std::integral_constant, std::integral_constant>; diff --git a/src/cuNumeric.jl b/src/cuNumeric.jl index 0f34edef..37d099c0 100644 --- a/src/cuNumeric.jl +++ b/src/cuNumeric.jl @@ -1,4 +1,4 @@ -#= Copyright 2025 Northwestern University, +#= Copyright 2026 Northwestern University, * Carnegie Mellon University University * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,7 @@ * * Author(s): David Krasowska * Ethan Meitz + * Nader Rahhal =# module cuNumeric @@ -56,8 +57,20 @@ const DEFAULT_INT = Int32 const SUPPORTED_INT_TYPES = Union{Int32,Int64} const SUPPORTED_FLOAT_TYPES = Union{Float32,Float64} -const SUPPORTED_NUMERIC_TYPES = Union{SUPPORTED_INT_TYPES,SUPPORTED_FLOAT_TYPES} -const SUPPORTED_TYPES = Union{SUPPORTED_INT_TYPES,SUPPORTED_FLOAT_TYPES,Bool} #* TODO Test UInt, Complex +const SUPPORTED_COMPLEX_TYPES = Union{ComplexF32,ComplexF64} +const SUPPORTED_NUMERIC_TYPES = Union{ + SUPPORTED_INT_TYPES,SUPPORTED_FLOAT_TYPES,SUPPORTED_COMPLEX_TYPES +} +# const SUPPORTED_TYPES = Union{SUPPORTED_INT_TYPES,SUPPORTED_FLOAT_TYPES,Bool} #* TODO Test UInt, Complex + +const SUPPORTED_TYPES = Union{ + Bool, + Int8,Int16,Int32,Int64, + UInt8,UInt16,UInt32,UInt64, + Float16,Float32,Float64, + ComplexF32,ComplexF64, + String, +} # const MAX_DIM = 6 # idk what we compiled? @@ -181,16 +194,14 @@ global cuNumeric_config_str::String = "" const RUNTIME_INACTIVE = -1 const RUNTIME_ACTIVE = 0 const _runtime_ref = Ref{Int}(RUNTIME_INACTIVE) -const _start_lock = ReentrantLock() +const _start_lock = ReentrantLock() runtime_started() = _runtime_ref[] == RUNTIME_ACTIVE function _start_runtime() - Libdl.dlopen(CUPYNUMERIC_LIB_PATH, Libdl.RTLD_GLOBAL | Libdl.RTLD_NOW) Libdl.dlopen(CUPYNUMERIC_WRAPPER_LIB_PATH, Libdl.RTLD_GLOBAL | Libdl.RTLD_NOW) - AA = ArgcArgv(String[]) # AA = ArgcArgv([Base.julia_cmd()[1]]) cuNumeric.initialize_cunumeric(AA.argc, getargv(AA)) @@ -200,7 +211,6 @@ function _start_runtime() Base.atexit(my_on_exit) - return RUNTIME_ACTIVE end diff --git a/src/ndarray/ndarray.jl b/src/ndarray/ndarray.jl index bb66084e..21bfbd31 100644 --- a/src/ndarray/ndarray.jl +++ b/src/ndarray/ndarray.jl @@ -1,4 +1,4 @@ -#= Copyright 2025 Northwestern University, +#= Copyright 2026 Northwestern University, * Carnegie Mellon University University * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,6 +15,7 @@ * * Author(s): David Krasowska * Ethan Meitz + * Nader Rahhal =# export unwrap diff --git a/test/tests/linalg.jl b/test/tests/linalg.jl index 7e3b2097..93bd6783 100644 --- a/test/tests/linalg.jl +++ b/test/tests/linalg.jl @@ -1,4 +1,4 @@ -#= Copyright 2025 Northwestern University, +#= Copyright 2026 Northwestern University, * Carnegie Mellon University University * * Licensed under the Apache License, Version 2.0 (the "License");