flat assembler
Message board for the users of flat assembler.

Index > Windows > Converting Neural Network to AVX

Author
Thread Post new topic Reply to topic
ohara



Joined: 13 Oct 2006
Posts: 20
ohara 19 Sep 2010, 20:16
Here is my first attempt at converting 128-bit xmm to 256-bit ymm (AVX). Although the new subroutines compile OK in FASM, I have not run the .exe file, as I have no AVX processor yet.
I noticed the conversion is very straightforward, although instructions do not seem to wrap easily across the 128-bit boundry.
Does anyone know if this will run on Windows XP, as I have heard windows 7 may be required for AVX.


Description:
Download
Filename: Network.zip
Filesize: 47.97 KB
Downloaded: 281 Time(s)

Post 19 Sep 2010, 20:16
View user's profile Send private message Reply with quote
LocoDelAssembly
Your code has a bug


Joined: 06 May 2005
Posts: 4624
Location: Argentina
LocoDelAssembly 19 Sep 2010, 20:38
Can't check myself now, but could you use the Software Development Emulator and tells us how it works with your program Razz
Post 19 Sep 2010, 20:38
View user's profile Send private message Reply with quote
ohara



Joined: 13 Oct 2006
Posts: 20
ohara 24 Sep 2010, 21:16
Great idea!. The program is now working fine on the SDE (after a little de-bugging!).
If you want to try it download the SDE and run my net.bat (everything has to be in the same directory)
The net.bat program runs
sde.exe -- avx-ok-Network.exe
The -- is very important else it won't work


Description:
Download
Filename: NN256.zip
Filesize: 50.59 KB
Downloaded: 271 Time(s)

Post 24 Sep 2010, 21:16
View user's profile Send private message Reply with quote
Tyler



Joined: 19 Nov 2009
Posts: 1216
Location: NC, USA
Tyler 24 Sep 2010, 23:37
I can't believe you made a neural network in asm. I'm working on one in C++ and the concept is still confusing. Smile
Post 24 Sep 2010, 23:37
View user's profile Send private message Reply with quote
ziral2088



Joined: 16 Aug 2009
Posts: 15
Location: Ukraine
ziral2088 25 Sep 2010, 04:39
has Core i7 support instructions AVX?
Post 25 Sep 2010, 04:39
View user's profile Send private message Reply with quote
bitRAKE



Joined: 21 Jul 2003
Posts: 4073
Location: vpcmpistri
bitRAKE 25 Sep 2010, 05:43
ziral2088 wrote:
has Core i7 support instructions AVX?
nope

http://en.wikipedia.org/wiki/Advanced_Vector_Extensions#CPUs_with_AVX

_________________
¯\(°_o)/¯ “languages are not safe - uses can be” Bjarne Stroustrup
Post 25 Sep 2010, 05:43
View user's profile Send private message Visit poster's website Reply with quote
Alphonso



Joined: 16 Jan 2007
Posts: 295
Alphonso 06 Jan 2011, 02:05
ohara wrote:
Does anyone know if this will run on Windows XP, as I have heard windows 7 may be required for AVX.

I'm not sure but looking at this

http://msdn.microsoft.com/en-us/library/ff919571%28v=vs.85%29.aspx

it seems with the advent of Sandy Bridge (i5/i7) and AVX being officially launched in the next few days that W7 will not be AVX ready until SP1 is released.

Will Vista get support?
Post 06 Jan 2011, 02:05
View user's profile Send private message Reply with quote
Feryno



Joined: 23 Mar 2005
Posts: 514
Location: Czech republic, Slovak republic
Feryno 07 Jan 2011, 06:15
running 8kB application only after waste 10-15 GB of disk space + few hours/days when installing, configuring, looking for drivers (w2k8 R2 SP1) ...

just my theoretical ideas and thoughts:

1.
OS is necessary to switch threads and save/restore thread context (= registers) at switches
older OS-es don't save/load YMM registers when switching threads
that doesn't hurt if only 1 thread using YMM regs is scheduled on CPU - even more threads may run on SMP you just assign execution of every YMM thread to only one CPU/core - set thread affinity

2.
I didn't study these registers yet, but YMM may be disabled at CPU by default and it requires to enable some bit(s) in control register (CR) or MSR
It is possible to do it using small driver (about 2-3 kB) to enable this/these bit(s) for older OS-es - I may strip such skeleton from my x64 bit projects (I can't remember just now whether I downported to 32 bit OS also) and adapt it in few minutes, just PM me which registers and which bits

I guess using the both above things may allow YMM app to run on older OS
You only need to buy new CPU with AVX (+ motherboard + RAM + ...) - personally I would prefer costless emulator(s) than wasting money for new HW until the price of new HW becomes more acceptable or my old HW dies which forces me to buy the newer one
Post 07 Jan 2011, 06:15
View user's profile Send private message Visit poster's website ICQ Number Reply with quote
Alphonso



Joined: 16 Jan 2007
Posts: 295
Alphonso 07 Jan 2011, 07:54
Umm, I was under the impression it was to do with (not) saving ymm during context switch but I'm not sure. Wouldn't that require a kernel change with the dispatcher? and in that case wouldn't it mean older versions requiring MS to do likewise for the respective kernels? In other words it would be up to MS to provide support unless some clever guy (not me Sad) can patch the kernel.
Post 07 Jan 2011, 07:54
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2139
Location: Estonia
Madis731 10 Jan 2011, 14:51
I've read that W7 supports AVX with SP1 but you can already download the RC - http://www.bit-tech.net/news/bits/2010/10/27/windows-7-sp1-rc-released/1

The pricing varies, but i3 2100 http://ark.intel.com/Compare.aspx?ids=53422,52214,37147 + any *67 mobo will set you free of about $300. Its about 250€ and up here in Estonia so prices can vary very much.
Post 10 Jan 2011, 14:51
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.