# HG changeset patch # User Shohei KOKUBO # Date 1381825777 -32400 # Node ID 5d68a55d55610cb5a93d71db80114c8c07234bef # Parent c12df61ded455a004e45904276745bf1a03becd6 fix profile diff -r c12df61ded45 -r 5d68a55d5561 TaskManager/Fifo/FifoDmaManager.cc --- a/TaskManager/Fifo/FifoDmaManager.cc Tue Oct 15 17:21:10 2013 +0900 +++ b/TaskManager/Fifo/FifoDmaManager.cc Tue Oct 15 17:29:37 2013 +0900 @@ -251,7 +251,7 @@ start_dmawait_profile = &do_start_dmawait_profile; end_dmawait_profile = &do_end_dmawait_profile; - + (*this->start_dmawait_profile)(); stop_time = gettime(); } diff -r c12df61ded45 -r 5d68a55d5561 TaskManager/kernel/ppe/TaskList.h --- a/TaskManager/kernel/ppe/TaskList.h Tue Oct 15 17:21:10 2013 +0900 +++ b/TaskManager/kernel/ppe/TaskList.h Tue Oct 15 17:29:37 2013 +0900 @@ -20,7 +20,7 @@ int dim; size_t x,y,z; Task tasks[TASK_MAX_SIZE]; // 32*TASK_MAX_SIZE - unsigned long long start_time,stop_time; + unsigned long long task_start_time,task_end_time; TaskPtr last() { return (TaskPtr)(((memaddr)tasks)+lastTask); } void set_last(Task *t) { lastTask = ((memaddr)t) - ((memaddr)tasks); } diff -r c12df61ded45 -r 5d68a55d5561 TaskManager/kernel/schedule/SchedTask.cc --- a/TaskManager/kernel/schedule/SchedTask.cc Tue Oct 15 17:21:10 2013 +0900 +++ b/TaskManager/kernel/schedule/SchedTask.cc Tue Oct 15 17:29:37 2013 +0900 @@ -114,7 +114,7 @@ connector->dma_wait((DMA_READ + this->tag)); void *read = get_input(readbuf, 0); void *write = get_output(writebuf, 0); // set param (if exist dim ) - list->start_time = gettime(); + list->task_start_time = gettime(); (*connector->start_dmawait_profile)(); if (list->dim) { multi_dimension(list, read, write,run); @@ -122,8 +122,8 @@ run(this, read,write); } (*connector->end_dmawait_profile)(&connector->global_busy_time); - list->stop_time = gettime(); - this->printf("%s\t%lld\n",(char *)(task_list[atask->command].name),list->stop_time-list->start_time); + list->task_end_time = gettime(); + this->printf("%d %s\t%lld\n",list->self->cpu_type,(char *)(task_list[atask->command].name),list->task_end_time-list->task_start_time); connector->free_(readbuf); // User 側で作る方法が必要... // 書き込む領域がなければ無視 diff -r c12df61ded45 -r 5d68a55d5561 TaskManager/test/GpuRunTest/Makefile.macosx --- a/TaskManager/test/GpuRunTest/Makefile.macosx Tue Oct 15 17:21:10 2013 +0900 +++ b/TaskManager/test/GpuRunTest/Makefile.macosx Tue Oct 15 17:29:37 2013 +0900 @@ -6,10 +6,11 @@ OBJS = $(SRCS:.cc=.o) ABIBIT=64 +GPU_TASK_DIR = gpu TASK_DIR = ppe TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc) TASK_SRCS_EXCLUDE = -TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) +TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) $(wildcar $(GPU_TASK_DIR)/*.cc) TASK_OBJS = $(TASK_SRCS:.cc=.o) LIBS += -lFifoManager `sdl-config --libs` diff -r c12df61ded45 -r 5d68a55d5561 TaskManager/test/GpuRunTest/gpu/gpu_task_init.cc --- a/TaskManager/test/GpuRunTest/gpu/gpu_task_init.cc Tue Oct 15 17:21:10 2013 +0900 +++ b/TaskManager/test/GpuRunTest/gpu/gpu_task_init.cc Tue Oct 15 17:29:37 2013 +0900 @@ -3,5 +3,5 @@ void gpu_task_init(void) { - GpuSchedRegister(Twice, "gpu/twice.cl", "twice"); + GpuSchedRegister(Twice, "twice.cl", "twice"); } diff -r c12df61ded45 -r 5d68a55d5561 TaskManager/test/GpuRunTest/gpu/gpu_task_init.o Binary file TaskManager/test/GpuRunTest/gpu/gpu_task_init.o has changed diff -r c12df61ded45 -r 5d68a55d5561 TaskManager/test/UtilizationTest/main.cc --- a/TaskManager/test/UtilizationTest/main.cc Tue Oct 15 17:21:10 2013 +0900 +++ b/TaskManager/test/UtilizationTest/main.cc Tue Oct 15 17:29:37 2013 +0900 @@ -74,7 +74,7 @@ } long task_id = 0; - HTask *multiply = manager->create_task(MULTIPLY_TASK1); + HTask *multiply = manager->create_task(MULTIPLY_TASK); multiply->set_cpu((CPU_TYPE)((int)SPE_0)); multiply->set_inData(0,(memaddr)A, sizeof(float)*length); @@ -102,21 +102,21 @@ previous = multiply; } - for(int i=1;i<4;i++) { - multiply = manager->create_task(MULTIPLY_TASK); - multiply->set_cpu((CPU_TYPE)((int)SPE_0+i+4)); + // for(int i=1;i<4;i++) { + // multiply = manager->create_task(MULTIPLY_TASK); + // multiply->set_cpu((CPU_TYPE)((int)SPE_0+i+4)); - multiply->set_inData(0,(memaddr)A, sizeof(float)*length); - multiply->set_inData(1,(memaddr)B, sizeof(float)*length); - multiply->set_param(0,task_id++); - multiply->set_outData(0,(memaddr)C, sizeof(float)*length); + // multiply->set_inData(0,(memaddr)A, sizeof(float)*length); + // multiply->set_inData(1,(memaddr)B, sizeof(float)*length); + // multiply->set_param(0,task_id++); + // multiply->set_outData(0,(memaddr)C, sizeof(float)*length); - multiply->wait_for(previous); + // multiply->wait_for(previous); - multiply->spawn(); + // multiply->spawn(); - previous = multiply; - } + // previous = multiply; + // } // // HTask* second_multiply = manager->create_task(MULTIPLY_TASK); // // second_multiply->set_cpu(SPE_1); diff -r c12df61ded45 -r 5d68a55d5561 TaskManager/test/UtilizationTest/multiply Binary file TaskManager/test/UtilizationTest/multiply has changed diff -r c12df61ded45 -r 5d68a55d5561 example/fft/Makefile.macosx --- a/example/fft/Makefile.macosx Tue Oct 15 17:21:10 2013 +0900 +++ b/example/fft/Makefile.macosx Tue Oct 15 17:29:37 2013 +0900 @@ -6,11 +6,11 @@ SRCS = $(filter-out $(SRCS_EXCLUDE),$(SRCS_TMP)) OBJS = $(SRCS:.cc=.o) -GPU_TASK_DIR = gpu +#GPU_TASK_DIR = gpu TASK_DIR = ppe TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc) TASK_SRCS_EXCLUDE = -TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) $(wildcard $(GPU_TASK_DIR)/*.cc) +TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) TASK_OBJS = $(TASK_SRCS:.cc=.o) CC = clang++ diff -r c12df61ded45 -r 5d68a55d5561 example/fft/main.cc --- a/example/fft/main.cc Tue Oct 15 17:21:10 2013 +0900 +++ b/example/fft/main.cc Tue Oct 15 17:29:37 2013 +0900 @@ -5,7 +5,7 @@ #include #include #include "TaskManager.h" -#include "GpuScheduler.h" +//#include "GpuScheduler.h" #include "SchedTask.h" #include "Func.h" #ifdef __APPLE__ @@ -15,7 +15,7 @@ #endif #include "pgm.h" extern void task_init(); -extern void gpu_task_init(); +//extern void gpu_task_init(); #define PI 3.14159265358979 @@ -278,7 +278,7 @@ int TMmain(TaskManager *manager, int argc, char** argv) { task_init(); - gpu_task_init(); + // gpu_task_init(); char * pgm_file = init(argc,argv); /* Read image */ int err = readPGM(&ipgm, pgm_file); diff -r c12df61ded45 -r 5d68a55d5561 example/multiply/Makefile.macosx --- a/example/multiply/Makefile.macosx Tue Oct 15 17:21:10 2013 +0900 +++ b/example/multiply/Makefile.macosx Tue Oct 15 17:29:37 2013 +0900 @@ -7,10 +7,10 @@ ABIBIT=64 TASK_DIR = ppe -GPU_TASK_DIR = gpu +#GPU_TASK_DIR = gpu TASK_SRCS_TMP = $(wildcard $(TASK_DIR)/*.cc) TASK_SRCS_EXCLUDE = -TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) $(wildcard $(GPU_TASK_DIR)/*.cc) +TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) TASK_OBJS = $(TASK_SRCS:.cc=.o) LIBS += -lFifoManager `sdl-config --libs` diff -r c12df61ded45 -r 5d68a55d5561 example/multiply/main.cc --- a/example/multiply/main.cc Tue Oct 15 17:21:10 2013 +0900 +++ b/example/multiply/main.cc Tue Oct 15 17:29:37 2013 +0900 @@ -6,7 +6,7 @@ #include "Func.h" extern void task_init(void); -extern void gpu_task_init(void); +//extern void gpu_task_init(void); static int task = 1; static int length = DATA_NUM; static CPU_TYPE spe_cpu = SPE_ANY; @@ -111,7 +111,7 @@ init(argc, argv); // Task Register task_init(); - gpu_task_init(); + // gpu_task_init(); for (int i = 0; i < task; ++i) { multi_init(manager); }