ALT Linux Sisyphus discussions
 help / color / mirror / Atom feed
From: Alexey Tourbin <at@altlinux.ru>
To: sisyphus@lists.altlinux.org
Subject: Re: [sisyphus] ATLAS vs BLAS performance
Date: Mon, 5 Jun 2006 06:41:47 +0400
Message-ID: <20060605024147.GD18120@localhost.localdomain> (raw)
In-Reply-To: <20060605011709.GC18120@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 1979 bytes --]

On Mon, Jun 05, 2006 at 05:17:09AM +0400, Alexey Tourbin wrote:
> > > > ATLAS w/ SSE2:
> > > > > mm <- matrix(rnorm(10^6), ncol = 10^3)
> > > > > system.time(crossprod(mm))
> > > >
> > > > [1] 0.344 0.020 0.369 0.000 0.000
^^^^^^^^^^^^^^^^^

> > > А вот с GotoBLAS 1.2 (P4 2.8GHz, R 2.3.0):
> > > 
> > > > mm <- matrix(rnorm(10^6), ncol = 10^3)
> > > > system.time(crossprod(mm))
> > > [1] 0.232 0.012 0.270 0.000 0.000
> > 
> > model name      : AMD Athlon(tm) 64 Processor 3200+
> > cpu MHz         : 2050.186
> > cache size      : 512 KB
> 
> > В общем, если это будет работать из коробки как надо и если по сравнению
> > с GotoBLAS разница будет не хуже, чем в полтора раза, тогда я буду
> > доволелен.  Потому что основной разрыв по сравнению с фортраном всё
> > равно ликвидирован, а 10-20% на практике редко что решают.
> 
> А вот ATLAS без оптимизации под P4SSE2:
> 
> > mm <- matrix(rnorm(10^6), ncol = 10^3)
> > system.time(crossprod(mm))
> [1] 0.584 0.012 0.624 0.000 0.000

А вот собранный под Athlon64 (HAMMER32SSE2, т.е. ближе всего к тому
процессору, что у меня).

> mm <- matrix(rnorm(10^6), ncol = 10^3)
> system.time(crossprod(mm))
[1] 0.312 0.016 0.330 0.000 0.000

Т.е. немного лучше, чем для P4SSE2.  (Набор инструкций в данном случае
не отличается, отличаются только некоторые параметры управления L1/L2
кешем, или что там ещё).

SSE2 сейчас является общим знаменателем для P4 и современных атлонов.
Поскольку x86 ещё некоторое время будет существовать, то софт, для
которого специфическая оптимизация имеет смысл (и дает существенный
выигрыш, как в случае с числодробильными библиотеками), стоит
собирать праллельно и ставить в /usr/lib/sse2.  Правда, кроеме ATLAS
сходу на ум ничего не приходит.

А вообще надо переходить на x86_64, как я понимаю проблем с оптимизацией
"под архитектуру" там будет гораздо меньше (т.е. в первых Athlon64 не
было SSE3, а в P4 есс-но нет 3dNow, но остальное всё совпадает).

[-- Attachment #2: Type: application/pgp-signature, Size: 191 bytes --]

  reply	other threads:[~2006-06-05  2:41 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-04 21:05 Alexey Tourbin
2006-06-04 22:04 ` Ivan Adzhubey
2006-06-04 22:26   ` Alexey Tourbin
2006-06-05  1:17     ` Alexey Tourbin
2006-06-05  2:41       ` Alexey Tourbin [this message]
2006-06-05  4:22     ` Valery Pipin
2006-06-05  7:30       ` Alexey Tourbin
2006-06-05  7:45         ` Ivan Adzhubey
2006-06-05  6:19     ` Andrey Khavryuchenko
2006-06-05  7:50       ` Alexey Tourbin
2006-06-05  7:58         ` Andrey Khavryuchenko
2006-06-05 10:11         ` Alexey Tourbin
2006-06-06 11:14           ` Alexey Tourbin
2006-11-24 23:58             ` Alexey Tourbin
2006-06-05  7:53       ` Ivan Adzhubey
2006-06-05  7:57         ` Ivan Adzhubey
2006-06-05  9:36         ` Andrey Khavryuchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060605024147.GD18120@localhost.localdomain \
    --to=at@altlinux.ru \
    --cc=sisyphus@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Sisyphus discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
		sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
	public-inbox-index sisyphus

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.sisyphus


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git