Skip to content
This repository was archived by the owner on Feb 2, 2024. It is now read-only.

Commit a3b8a02

Browse files
authored
Remove XENON extention (#325)
1 parent 26e8acc commit a3b8a02

9 files changed

Lines changed: 1 addition & 1135 deletions

File tree

buildscripts/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
sys.exit(0)
114114

115115
os.environ['HDF5_DIR'] = conda_prefix
116-
coverage_omit = './sdc/ml/*,./sdc/xenon_ext.py,./sdc/ros.py,./sdc/cv_ext.py,./sdc/tests/*'
116+
coverage_omit = './sdc/ml/*,./sdc/cv_ext.py,./sdc/tests/*'
117117
coverage_cmd = ' && '.join(['coverage erase',
118118
f'coverage run --source=./sdc --omit {coverage_omit} ./sdc/runtests.py',
119119
'coveralls -v'])

sdc/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@
5151
import sdc.timsort
5252
from sdc.decorators import jit
5353

54-
if sdc.config._has_xenon:
55-
from sdc.io.xenon_ext import read_xenon, xe_connect, xe_open, xe_close
56-
5754
multithread_mode = False
5855

5956

sdc/config.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@
5656
_has_opencv = True
5757
import sdc.cv_ext
5858

59-
try:
60-
from . import hxe_ext
61-
except ImportError:
62-
_has_xenon = False
63-
else:
64-
_has_xenon = True
65-
import sdc.io.xenon_ext
66-
6759
config_transport_mpi_default = distutils_util.strtobool(os.getenv('SDC_CONFIG_MPI', 'True'))
6860
'''
6961
Default value for transport used if no function decorator controls the transport

sdc/distributed.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -591,54 +591,6 @@ def f(fname, cindex, start, count): # pragma: no cover
591591
out += f_block.body[:-2]
592592
out[-1].target = assign.target
593593

594-
# TODO: fix numba.extending
595-
if sdc.config._has_xenon and (fdef == ('read_xenon_col', 'numba.extending')
596-
and self._is_1D_arr(rhs.args[3].name)):
597-
arr = rhs.args[3].name
598-
assert len(self._array_starts[arr]) == 1, "only 1D arrs in Xenon"
599-
start_var = self._array_starts[arr][0]
600-
count_var = self._array_counts[arr][0]
601-
rhs.args += [start_var, count_var]
602-
603-
def f(connect_tp, dset_tp, col_id_tp, column_tp, schema_arr_tp, start, count): # pragma: no cover
604-
return sdc.io.xenon_ext.read_xenon_col_parallel(
605-
connect_tp, dset_tp, col_id_tp, column_tp, schema_arr_tp, start, count)
606-
607-
return self._replace_func(f, rhs.args)
608-
609-
if sdc.config._has_xenon and (fdef == ('read_xenon_str', 'numba.extending')
610-
and self._is_1D_arr(lhs)):
611-
arr = lhs
612-
size_var = rhs.args[3]
613-
assert self.state.typemap[size_var.name] == types.intp
614-
self._array_sizes[arr] = [size_var]
615-
out, start_var, count_var = self._gen_1D_div(size_var, scope, loc,
616-
"$alloc", "get_node_portion", distributed_api.get_node_portion)
617-
self._array_starts[lhs] = [start_var]
618-
self._array_counts[lhs] = [count_var]
619-
rhs.args.remove(size_var)
620-
rhs.args.append(start_var)
621-
rhs.args.append(count_var)
622-
623-
def f(connect_tp, dset_tp, col_id_tp, schema_arr_tp, start_tp, count_tp): # pragma: no cover
624-
return sdc.io.xenon_ext.read_xenon_str_parallel(
625-
connect_tp, dset_tp, col_id_tp, schema_arr_tp, start_tp, count_tp)
626-
627-
f_block = compile_to_numba_ir(f,
628-
{'sdc': sdc},
629-
self.state.typingctx,
630-
(sdc.io.xenon_ext.xe_connect_type,
631-
sdc.io.xenon_ext.xe_dset_type,
632-
types.intp,
633-
self.state.typemap[rhs.args[3].name],
634-
types.intp,
635-
types.intp),
636-
self.state.typemap,
637-
self.state.calltypes).blocks.popitem()[1]
638-
replace_arg_nodes(f_block, rhs.args)
639-
out += f_block.body[:-2]
640-
out[-1].target = assign.target
641-
642594
if (func_mod == 'sdc.hiframes.api' and func_name in (
643595
'to_arr_from_series', 'ts_series_to_arr_typ',
644596
'to_date_series_type', 'init_series')

sdc/distributed_analysis.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -485,18 +485,6 @@ def _analyze_call(self, lhs, rhs, func_var, args, array_dists):
485485
array_dists[lhs] = Distribution.OneD
486486
return
487487

488-
# TODO: fix "numba.extending" in function def
489-
if sdc.config._has_xenon and fdef == ('read_xenon_col', 'numba.extending'):
490-
array_dists[args[4].name] = Distribution.REP
491-
return
492-
493-
if sdc.config._has_xenon and fdef == ('read_xenon_str', 'numba.extending'):
494-
array_dists[args[4].name] = Distribution.REP
495-
# string read creates array in output
496-
if lhs not in array_dists:
497-
array_dists[lhs] = Distribution.OneD
498-
return
499-
500488
if func_name == 'train' and isinstance(func_mod, ir.Var):
501489
if self.typemap[func_mod.name] == sdc.ml.svc.svc_type:
502490
self._meet_array_dists(

sdc/hiframes/hiframes_untyped.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -457,13 +457,6 @@ def _run_call(self, assign, label):
457457
if fdef == ('fromfile', 'numpy'):
458458
return sdc.io.np_io._handle_np_fromfile(assign, lhs, rhs)
459459

460-
if fdef == ('read_xenon', 'sdc.xenon_ext'):
461-
col_items, nodes = sdc.xenon_ext._handle_read(assign, lhs, rhs, self.state.func_ir)
462-
df_nodes, col_map = self._process_df_build_map(col_items)
463-
self._create_df(lhs.name, col_map, label)
464-
nodes += df_nodes
465-
return nodes
466-
467460
return [assign]
468461

469462
def _run_call_df(self, assign, lhs, rhs, df_var, func_name, label):

0 commit comments

Comments
 (0)