Weird merge problems.

This commit is contained in:
james.brodman
2013-10-07 14:20:59 -04:00
7 changed files with 1050 additions and 1819 deletions

View File

@@ -200,7 +200,7 @@ def check_targets():
answer = answer + ["sse4-i32x4", "sse4-i32x8", "sse4-i16x8", "sse4-i8x16"]
if AVX == False and "avx" in f_lines[i]:
AVX = True;
answer = answer + ["avx1-i32x8", "avx1-i32x16"]
answer = answer + ["avx1-i32x8", "avx1-i32x16", "avx1-i64x4"]
if AVX11 == False and "rdrand" in f_lines[i]:
AVX11 = True;
answer = answer + ["avx1.1-i32x8", "avx1.1-i32x16"]
@@ -217,7 +217,7 @@ def check_targets():
answer = answer + ["sse4-i32x4", "sse4-i32x8", "sse4-i16x8", "sse4-i8x16"]
if "AVX1.0" in f_lines:
AVX = True;
answer = answer + ["avx1-i32x8", "avx1-i32x16"]
answer = answer + ["avx1-i32x8", "avx1-i32x16", "avx1-i64x4"]
if "RDRAND" in f_lines:
AVX11 = True;
answer = answer + ["avx1.1-i32x8", "avx1.1-i32x16"]
@@ -246,7 +246,7 @@ def check_targets():
if SSE4 == False and "wsm" in f_lines[i]:
answer_sde = answer_sde + [["-wsm", "sse4-i32x4"], ["-wsm", "sse4-i32x8"], ["-wsm", "sse4-i16x8"], ["-wsm", "sse4-i8x16"]]
if AVX == False and "snb" in f_lines[i]:
answer_sde = answer_sde + [["-snb", "avx1-i32x8"], ["-snb", "avx1-i32x16"]]
answer_sde = answer_sde + [["-snb", "avx1-i32x8"], ["-snb", "avx1-i32x16"], ["-snb", "avx1-i64x4"]]
if AVX11 == False and "ivb" in f_lines[i]:
answer_sde = answer_sde + [["-ivb", "avx1.1-i32x8"], ["-ivb", "avx1.1-i32x16"]]
if AVX2 == False and "hsw" in f_lines[i]:
@@ -353,8 +353,12 @@ def validation_run(only, only_targets, reference_branch, number, notify, update,
else:
common.check_tools(1)
if only_targets != "":
only_targets += " "
only_targets = only_targets.replace("generic "," generic-4 generic-16 ")
only_targets_t = only_targets.split(" ")
for i in only_targets_t:
if i == "":
continue
err = True
for j in range(0,len(targets_t)):
if i in targets_t[j]:

View File

@@ -83,7 +83,8 @@ def print_debug(line, silent, filename):
sys.stdout.write(line)
sys.stdout.flush()
if os.environ.get("ISPC_HOME") != None:
write_to_file(os.environ["ISPC_HOME"] + os.sep + "notify_log.log", line)
if os.path.exists(os.environ.get("ISPC_HOME")):
write_to_file(os.environ["ISPC_HOME"] + os.sep + "notify_log.log", line)
if filename != "":
write_to_file(filename, line)

View File

@@ -9,18 +9,26 @@ CC=gcc
CCFLAGS=-Iobjs/ -O2
LIBS=-lm $(TASK_LIB) -lstdc++
ISPC=ispc -O2 $(ISPC_FLAGS)
ISPC=ispc
ISPC_FLAGS=-O2
ISPC_HEADER=objs/$(ISPC_SRC:.ispc=_ispc.h)
ARCH:=$(shell uname -m | sed -e s/x86_64/x86/ -e s/arm.*/arm/ -e s/sa110/arm/)
ARCH:=$(shell uname -m | sed -e s/x86_64/x86/ -e s/i686/x86/ -e s/arm.*/arm/ -e s/sa110/arm/)
ifeq ($(ARCH),x86)
ISPC_OBJS=$(addprefix objs/, $(ISPC_SRC:.ispc=)_ispc.o $(ISPC_SRC:.ispc=)_ispc_sse2.o \
$(ISPC_SRC:.ispc=)_ispc_sse4.o $(ISPC_SRC:.ispc=)_ispc_avx.o)
ISPC_TARGETS=$(ISPC_IA_TARGETS)
ISPC_FLAGS += --arch=x86-64
CXXFLAGS += -m64
CCFLAGS += -m64
ARCH_BIT:=$(shell getconf LONG_BIT)
ifeq ($(ARCH_BIT),32)
ISPC_FLAGS += --arch=x86
CXXFLAGS += -m32
CCFLAGS += -m32
else
ISPC_FLAGS += --arch=x86-64
CXXFLAGS += -m64
CCFLAGS += -m64
endif
else ifeq ($(ARCH),arm)
ISPC_OBJS=$(addprefix objs/, $(ISPC_SRC:.ispc=_ispc.o))
ISPC_TARGETS=$(ISPC_ARM_TARGETS)
@@ -61,10 +69,10 @@ objs/%.o: ../%.cpp dirs
objs/$(EXAMPLE).o: objs/$(EXAMPLE)_ispc.h
objs/%_ispc.h objs/%_ispc.o objs/%_ispc_sse2.o objs/%_ispc_sse4.o objs/%_ispc_avx.o: %.ispc
$(ISPC) --target=$(ISPC_TARGETS) $< -o objs/$*_ispc.o -h objs/$*_ispc.h
$(ISPC) $(ISPC_FLAGS) --target=$(ISPC_TARGETS) $< -o objs/$*_ispc.o -h objs/$*_ispc.h
objs/$(ISPC_SRC:.ispc=)_sse4.cpp: $(ISPC_SRC)
$(ISPC) $< -o $@ --target=generic-4 --emit-c++ --c++-include-file=sse4.h
$(ISPC) $(ISPC_FLAGS) $< -o $@ --target=generic-4 --emit-c++ --c++-include-file=sse4.h
objs/$(ISPC_SRC:.ispc=)_sse4.o: objs/$(ISPC_SRC:.ispc=)_sse4.cpp
$(CXX) -I../intrinsics -msse4.2 $< $(CXXFLAGS) -c -o $@
@@ -73,7 +81,7 @@ $(EXAMPLE)-sse4: $(CPP_OBJS) objs/$(ISPC_SRC:.ispc=)_sse4.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
objs/$(ISPC_SRC:.ispc=)_generic16.cpp: $(ISPC_SRC)
$(ISPC) $< -o $@ --target=generic-16 --emit-c++ --c++-include-file=generic-16.h
$(ISPC) $(ISPC_FLAGS) $< -o $@ --target=generic-16 --emit-c++ --c++-include-file=generic-16.h
objs/$(ISPC_SRC:.ispc=)_generic16.o: objs/$(ISPC_SRC:.ispc=)_generic16.cpp
$(CXX) -I../intrinsics $< $(CXXFLAGS) -c -o $@
@@ -82,7 +90,7 @@ $(EXAMPLE)-generic16: $(CPP_OBJS) objs/$(ISPC_SRC:.ispc=)_generic16.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)
objs/$(ISPC_SRC:.ispc=)_scalar.o: $(ISPC_SRC)
$(ISPC) $< -o $@ --target=generic-1
$(ISPC) $(ISPC_FLAGS) $< -o $@ --target=generic-1
$(EXAMPLE)-scalar: $(CPP_OBJS) objs/$(ISPC_SRC:.ispc=)_scalar.o
$(CXX) $(CXXFLAGS) -o $@ $^ $(LIBS)

File diff suppressed because it is too large Load Diff

View File

@@ -931,3 +931,21 @@
.\tests\switch-12.ispc compfail x86 avx2-i32x16 Windows LLVM 3.3 cl -O2 *
.\tests\switch-8.ispc compfail x86 avx2-i32x16 Windows LLVM 3.3 cl -O2 *
.\tests\switch-9.ispc compfail x86 avx2-i32x16 Windows LLVM 3.3 cl -O2 *
.\tests\exclusive-scan-add-10.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\exclusive-scan-add-9.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\max-uint-1.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\max-uint.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\min-uint-2.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\packed-load-1.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\packed-store.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\reduce-add-uint-1.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\reduce-add-uint.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\reduce-add-uint64-1.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\reduce-add-uint64.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\reduce-max-uint.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\reduce-min-uint64.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\uint64-max-1.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\uint64-max.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\uint64-min-1.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\uint64-min.ispc runfail x86 avx1-i64x4 Windows LLVM 3.3 cl -O2 *
.\tests\reduce-min-uint64.ispc runfail x86 avx1-i64x4 Windows LLVM 3.4 cl -O2 *

View File

@@ -714,11 +714,11 @@ Target::SupportedTargets() {
#endif
"sse2-i32x4, sse2-i32x8, "
"sse4-i32x4, sse4-i32x8, sse4-i16x8, sse4-i8x16, "
"avx1-i32x8, avx1-i32x16, "
"avx1-i32x8, avx1-i32x16, avx1-i64x4, "
"avx1.1-i32x8, avx1.1-i32x16, "
"avx2-i32x8, avx2-i32x16, "
"generic-x1, generic-x4, generic-x8, generic-x16, "
"generic-x32, generic-x64";
"generic-x32, generic-x64";
}

View File

@@ -335,8 +335,6 @@ def run_tasks_from_queue(queue, queue_ret, queue_skip, total_tests_arg, max_test
skip_files += [ filename ]
task_threads = []
def sigint(signum, frame):
for t in task_threads:
t.terminate()
@@ -426,6 +424,8 @@ def file_check(compfails, runfails):
for i in range (0,len(new_compfails)):
new_f_lines.append(new_compfails[i] + " compfail " + new_line)
print_debug("\t" + new_compfails[i] + "\n", s, run_tests_log)
if len(new_runfails) == 0 and len(new_compfails) == 0:
print_debug("No new fails\n", s, run_tests_log)
if len(new_passes_runfails) != 0:
print_debug("NEW PASSES after RUNFAILS:\n", s, run_tests_log)
for i in range (0,len(new_passes_runfails)):
@@ -449,7 +449,7 @@ def verify():
check = [["g++", "clang", "cl"],["-O0", "-O2"],["x86","x86-64"],
["Linux","Windows","Mac"],["LLVM 3.1","LLVM 3.2","LLVM 3.3","LLVM head"],
["sse2-i32x4", "sse2-i32x8", "sse4-i32x4", "sse4-i32x8", "sse4-i16x8",
"sse4-i8x16", "avx1-i32x8", "avx1-i32x16", "avx1.1-i32x8", "avx1.1-i32x16",
"sse4-i8x16", "avx1-i32x8", "avx1-i32x16", "avx1-i64x4", "avx1.1-i32x8", "avx1.1-i32x16",
"avx2-i32x8", "avx2-i32x16", "generic-1", "generic-4", "generic-8",
"generic-16", "generic-32", "generic-64"]]
for i in range (0,len(f_lines)):
@@ -564,7 +564,6 @@ def run_tests(options1, args, print_version):
# failing_tests/, and tests_errors/
if len(args) == 0:
files = glob.glob(ispc_root + os.sep + "tests" + os.sep + "*ispc") + \
glob.glob(ispc_root + os.sep + "failing_tests" + os.sep + "*ispc") + \
glob.glob(ispc_root + os.sep + "tests_errors" + os.sep + "*ispc")
else:
if is_windows:
@@ -625,12 +624,12 @@ def run_tests(options1, args, print_version):
start_time = time.time()
# launch jobs to run tests
glob_var = [is_windows, options, s, ispc_exe, is_generic_target, run_tests_log]
global task_threads
task_threads = [0] * nthreads
for x in range(nthreads):
t = multiprocessing.Process(target=run_tasks_from_queue, args=(q, qret, qskip, total_tests,
task_threads[x] = multiprocessing.Process(target=run_tasks_from_queue, args=(q, qret, qskip, total_tests,
max_test_length, finished_tests_counter, finished_tests_counter_lock, glob_var))
task_threads.append(t)
t.start()
task_threads[x].start()
# wait for them to all finish and then return the number that failed
# (i.e. return 0 if all is ok)
for t in task_threads:
@@ -663,6 +662,8 @@ def run_tests(options1, args, print_version):
print_debug("%d / %d tests FAILED execution:\n" % (len(run_error_files), total_tests), s, run_tests_log)
for f in run_error_files:
print_debug("\t%s\n" % f, s, run_tests_log)
if len(compile_error_files) == 0 and len(run_error_files) == 0:
print_debug("No fails\n", s, run_tests_log)
R = file_check(compile_error_files, run_error_files)