Git Product home page Git Product logo

hipacc / hipacc Goto Github PK

View Code? Open in Web Editor NEW
75.0 16.0 12.0 23.58 MB

A domain-specific language and compiler for image processing

Home Page: https://hipacc-lang.org

License: BSD 2-Clause "Simplified" License

CMake 1.60% Shell 0.08% C++ 97.89% PowerShell 0.15% Batchfile 0.01% Makefile 0.03% XSLT 0.25%
dsl cuda opencl renderscript filterscript gpu stencil-codes computer-vision image-processing hipacc

hipacc's Introduction

Build and Test Status

Hipacc

A domain-specific language and compiler for image processing

Hipacc allows to design image processing kernels and algorithms in a domain-specific language (DSL). From this high-level description, low-level target code for GPU accelerators is generated using source-to-source translation. As back ends, the framework supports C/C++, CUDA, OpenCL. There is also a fork of Hipacc that targets FPGAs.

Install

See Hipacc documentation and Install notes for detailed information.

Integration

See Integration for how to add Hipacc to cmake targets.

hipacc's People

Contributors

akifoezkan avatar ckobylko avatar oreiche avatar qiao-bo avatar richardmembarth avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hipacc's Issues

Can't install hipacc on Ubuntu 14.04

I have Clang-3.8, OpenCL with Cuda toolkit 7.5, Opencv-2.4.10 and cmake-3.4.3 installed on my laptop. I'm using Ubuntu 14.04.
I run cmake whith:
cmake -DCMAKE_INSTALL_PREFIX=$HOME/Documents/Thèse/HIPAcc/hipacc-master/install -DCMAKE_BUILD_TYPE=Release -DOpenCL_INC_DIR=/usr/local/cuda/include -DOpenCL_LIB_DIR=/usr/local/cuda/lib64 -DOpenCV_DIR=/usr/local/lib -DUSE_JIT_ESTIMATE=on ..

This is the output of cmake:
-- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found Clang: /home/rokiatou/forge/openmp4/llvm/install/bin/clang -- Looking for pthread.h -- Looking for pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - not found -- Looking for pthread_create in pthreads -- Looking for pthread_create in pthreads - not found -- Looking for pthread_create in pthread -- Looking for pthread_create in pthread - found -- Found Threads: TRUE -- Found CUDA: /usr/local/cuda (found version "7.5") -- Could NOT find NVML (missing: NVML_INCLUDE_DIR) -- Found OpenCL: /usr/local/cuda/include -- Could NOT find Renderscript (missing: Renderscript_ndk_build_EXECUTABLE) -- Found OpenCV: /usr/local/include -- Configuration summary: -- === -- CUDA support: TRUE -- OpenCL support: TRUE -- Renderscript support: FALSE -- OpenCV support: TRUE -- Polly support: OFF -- JIT estimates: on -- === -- Configuring done -- Generating done -- Build files have been written to: /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/build
And after, when I run make, I get following erros:
In file included from /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/lib/AST/ASTClone.cpp:34:0: /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:11: error: expected ‘;’ at end of member declaration Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:439:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( CoroutineBodyStmt ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:28: error: expected ‘)’ before ‘*’ token Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:439:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( CoroutineBodyStmt ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:11: error: expected ‘;’ at end of member declaration Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:440:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( CoreturnStmt ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:28: error: expected ‘)’ before ‘*’ token Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:440:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( CoreturnStmt ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:11: error: expected ‘;’ at end of member declaration Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:456:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( OMPArraySectionExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:28: error: expected ‘)’ before ‘*’ token Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:456:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( OMPArraySectionExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:11: error: expected ‘;’ at end of member declaration Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:535:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( CoroutineSuspendExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:28: error: expected ‘)’ before ‘*’ token Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:535:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( CoroutineSuspendExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:11: error: expected ‘;’ at end of member declaration Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:536:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( CoawaitExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:28: error: expected ‘)’ before ‘*’ token Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:536:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( CoawaitExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:11: error: expected ‘;’ at end of member declaration Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:537:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( CoyieldExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:28: error: expected ‘)’ before ‘*’ token Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:537:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( CoyieldExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:11: error: expected ‘;’ at end of member declaration Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:570:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( MSPropertySubscriptExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:283:28: error: expected ‘)’ before ‘*’ token Expr *Visit##EXPR(EXPR *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:570:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_EXPR’ HIPACC_UNSUPPORTED_EXPR( MSPropertySubscriptExpr ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:11: error: expected ‘;’ at end of member declaration Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:583:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( OMPLoopDirective ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:28: error: expected ‘)’ before ‘*’ token Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:583:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( OMPLoopDirective ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:11: error: expected ‘;’ at end of member declaration Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:609:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( OMPTaskLoopDirective ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:28: error: expected ‘)’ before ‘*’ token Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:609:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( OMPTaskLoopDirective ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:11: error: expected ‘;’ at end of member declaration Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:610:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( OMPTaskLoopSimdDirective ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:287:28: error: expected ‘)’ before ‘*’ token Stmt *Visit##STMT(STMT *) { \ ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/include/hipacc/AST/ASTTranslate.h:610:5: note: in expansion of macro ‘HIPACC_UNSUPPORTED_STMT’ HIPACC_UNSUPPORTED_STMT( OMPTaskLoopSimdDirective ) ^ /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/lib/AST/ASTClone.cpp: In member function ‘clang::Expr* clang::hipacc::ASTTranslate::VisitVAArgExpr(clang::VAArgExpr*)’: /home/rokiatou/Documents/Thèse/HIPAcc/hipacc-master/lib/AST/ASTClone.cpp:583:10: error: ‘class clang::VAArgExpr’ has no member named ‘isMicrosoftABI’ E->isMicrosoftABI()); ^ make[2]: *** [lib/AST/CMakeFiles/hipaccASTTranslate.dir/ASTClone.cpp.o] Error 1 make[1]: *** [lib/AST/CMakeFiles/hipaccASTTranslate.dir/all] Error 2 make: *** [all] Error 2

I don't how to resolv this problem.
Thanks.

Can't compile old Hipacc code with the new version

Hi,

I come just install new version of Hipacc (today) and I can't compile my old code with this new version. My old installation of Hipacc dated last May and my codes compiled without problem with the old version.

Here is the I try to compile:

Mat img = cv::imread(argv[1], CV_LOAD_IMAGE_GRAYSCALE);
int width = img.cols;
int height = img.rows;
Image<uint8_t> input_img(width, height);
input_img = img_aligned.data;

Image<uint8_t> gauss_img(width, height);
IterationSpace<uint8_t> IsGauss_img(gauss_img);
Image<float> gradient(width, height);
IterationSpace<float> IsGradient(gradient);
//and so on ....

BoundaryCondition<uint8_t> boud_input(input_img, gauss, Boundary::REPEAT);
Accessor<uint8_t> in_accessor(boud_input);
GaussianFilter blur(IsGauss_img, in_accessor, dom, gauss);
blur.execute();
//and so on ....

I used the Makefile.cmake file in Hipacc/tests/ directory. With make cuda I get following errors:

main.cu(395): error: identifier "gradient" is undefined
main.cu(396): error: identifier "gauss_img" is undefined
main.cu(397): error: identifier "input_img" is undefined

It seems that all arrays declared with Image<type>data(...) are undefined.

And with make cpu:

./src/main.cpp:325:28: error: Constant expression for width argument of Image input_img required (C/C++ only).
Image<uint8_t> input_img(width, height);
^
./src/main.cpp:325:35: error: Constant expression for height argument of Image input_img required (C/C++ only).
Image<uint8_t> input_img(width, height);
^

I replaced width and height by constants but I get sames errors messages.

How can I solve this problem. I have formatted my PC and I no longer have my old Hipacc installation.

Thanks.

problem with hipacc data types

I started learning HIPAcc it just 2 days, so I'm a little new there in.
I wanted to bring my c ++ version of the sobel to HIPAcc using the example available in the "test" directory of HIPAcc.
Nevertheless, I encounter a problem, the output images of the HIPAcc version differ from the outputs of the c ++ version. I use the same types for both versions.
I
hipacc_sobel.tar.gz
attach to the message is the code, the CMakelist that I use to compile, the output images and the input image.
Thank you.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.