GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — mingw gcc msvc compilation · Issue #203 · tiny-dnn/tiny-dnn

mingw gcc msvc compilation #203

New issue
Copy link
New issue
Copy link
Closed
Closed
mingw gcc msvc compilation#203
Copy link
Labels
Wait for replybugquestion

Description

@pebz
pebz
opened on Jun 23, 2016
Issue body actions

I'm getting trouble using tiny-cnn with mingw or gcc.
For mingw, I need to change the free by _mm_free in align_allocator.h file unless I get unexpected crash.

#elif defined(__MINGW32__)
-     ::free(ptr);
+     ::_mm_free(ptr);

With this path I'm able to use tiny-cnn with mingw under windows.
But, I've run some benchmarks. I have compiled the same code based on /examples.main.cpp and tried it with

  • windows 7 + mingw 32 bits (-O3)
  • windows 7 + mingw 64 bits (-O3)
  • debian + gcc 5 (-O3)
  • windows 7 + MSVC 2015 (/O2)

For the 3 first versions, my bench runs in around 1300 s while the MSVC version runs in 80s!!
The differences in the code are small (only in this align_allocator). I also tried replacing the align allocation by simple malloc (for all versions) and got similar results.
Unfortunately, I can't use msvc on this.
Do you have any hints ? A compile option ?
Do you encounter the same issue ?

Thanks for your support

Activity

  1. nyanp commented on Jun 27, 2016

    @nyanp
    nyanp
    on Jun 27, 2016
    Member
    More actions

    @pebz
    Hi,

    For the 3 first versions, my bench runs in around 1300 s while the MSVC version runs in 80s!!

    1300s is too slow... It seems that some compile options for optimization isn't defined. If you built tiny-cnn with CMake, could you show me gcc's compile options generated by CMake? (you can use make VERBOSE=1 to see options)

  2. pebz commented on Jun 27, 2016

    @pebz
    pebz
    on Jun 27, 2016
    Author
    More actions

    Hi nyanp,

    Thanks for your answer.
    I didn't use CMake.
    I compile it directly:
    mingw/gcc: g++ -std=c++11 -I ../ -O3 main.cpp -o tiny-cnn-gcc
    msvc: cl -I../ /O2 main.cpp -o tiny-cnn-msvc
    (I also tried to add AVX SSE options without any result)

    Should I use CMake ?
    What kind of options should I add ?

  3. nyanp commented on Jun 27, 2016

    @nyanp
    nyanp
    on Jun 27, 2016
    Member
    More actions

    @pebz
    Thanks :) Adding -DCNN_USE_AVX with -mavx option will work.

  4. nyanp
    added
    question
    bug
    on Jul 2, 2016
  5. Randl commented on Feb 14, 2017

    @Randl
    Randl
    on Feb 14, 2017
    Contributor
    More actions

    @pebz can you confirm latest version works for you?

  6. Randl
    added
    Wait for reply
    on Feb 14, 2017
  7. Randl commented on Mar 7, 2017

    @Randl
    Randl
    on Mar 7, 2017
    Contributor
    More actions

    Closing. @pebz if you have any issues feel free to reopen or open a new issue

  8. Randl
    closed this as completedon Mar 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Wait for replybugquestion

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402792 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.