Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions mcdc/adapt.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,9 @@ def local_array(shape, dtype):

@numba.extending.type_callable(local_array)
def type_local_array(context):

from numba.core.typing.npydecl import parse_dtype, parse_shape

if isinstance(context, numba.core.typing.context.Context):

# Function repurposed from Numba's ol_np_empty.
def typer(shape, dtype):
numba.np.arrayobj._check_const_str_dtype("empty", dtype)
Expand Down Expand Up @@ -148,10 +146,8 @@ def typer(shape, dtype):
return typer

elif isinstance(context, numba.cuda.target.CUDATypingContext):

# Function repurposed from Numba's Cuda_array_decl.
def typer(shape, dtype):

# Only integer literals and tuples of integer literals are valid
# shapes
if isinstance(shape, types.Integer):
Expand Down Expand Up @@ -200,14 +196,12 @@ def typer(shape, dtype):

@numba.extending.lower_builtin(local_array, types.IntegerLiteral, types.Any)
def builtin_local_array(context, builder, sig, args):

shape, dtype = sig.args

from numba.core.typing.npydecl import parse_dtype, parse_shape
import numba.np.arrayobj as arrayobj

if isinstance(context, numba.core.cpu.CPUContext):

# No default arguments.
nb_dtype = parse_dtype(dtype)
nb_shape = parse_shape(shape)
Expand Down Expand Up @@ -420,7 +414,6 @@ def nopython_mode(is_on):


def gpu_forward_declare(args):

if args.gpu_rocm_path != None:
harm.config.set_rocm_path(args.gpu_rocm_path)

Expand Down Expand Up @@ -651,7 +644,6 @@ def finalize(prog: numba.uintp):
final_fn(prog)

def step(prog: numba.uintp, arg: arg_type):

step_async()

(step_async,) = harm.RuntimeSpec.async_dispatch(step)
Expand Down
9 changes: 9 additions & 0 deletions mcdc/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
parser.add_argument("--clear_cache", action="store_true")
parser.add_argument("--caching", action="store_true")
parser.add_argument("--no_caching", dest="caching", action="store_false")
parser.add_argument("--trace", action="store_true")
parser.add_argument(
"--trace_slot_limit",
type=int,
help="Maximum number of functions that may be traced.",
default=4096,
)
parser.add_argument("--runtime_output", default=False, action="store_true")
parser.set_defaults(caching=False)
args, unargs = parser.parse_known_args()
Expand All @@ -75,6 +82,8 @@
target = args.target
caching = args.caching
clear_cache = args.clear_cache
trace = args.trace
trace_slot_limit = args.trace_slot_limit

from mpi4py import MPI
import shutil
Expand Down
Loading
Loading