Determining Processor Vender

Discussion in 'Python' started by aha, Sep 5, 2008.

  1. aha

    aha Guest

    Dose anyone know of a cross-platform method for determining the vendor
    of a processor? Under linux I can check /proc/cpuinfo. What I'd like
    to be able to do is determine if a processor is AMD or Intel, so that
    I can use the appropriate numerical libraries for my application.

    Regards,

    Aquil
     
    aha, Sep 5, 2008
    #1
    1. Advertising

  2. aha

    aha Guest

    On Sep 5, 3:00 pm, aha <> wrote:
    > Dose anyone know of a cross-platform method for determining the vendor
    > of a processor?  Under linux I can check /proc/cpuinfo.  What I'd like
    > to be able to do is determine if a processor is AMD or Intel, so that
    > I can use the appropriate numerical libraries for my application.
    >
    > Regards,
    >
    > Aquil


    Additionally, I've tried the platform module...platform.processor() on
    my 64-bit AMD system, under Linux, returns x86_64. And under windows
    retruns an empty string ''
     
    aha, Sep 5, 2008
    #2
    1. Advertising

  3. aha

    John Machin Guest

    On Sep 6, 5:07 am, aha <> wrote:
    > On Sep 5, 3:00 pm, aha <> wrote:
    >
    > > Dose anyone know of a cross-platform method for determining the vendor
    > > of a processor?  Under linux I can check /proc/cpuinfo.  What I'd like
    > > to be able to do is determine if a processor is AMD or Intel, so that
    > > I can use the appropriate numerical libraries for my application.

    >
    > > Regards,

    >
    > > Aquil

    >
    > Additionally, I've tried the platform module...platform.processor() on
    > my 64-bit AMD system, under Linux, returns x86_64.  And under windows
    > retruns an empty string ''


    This may help with Windows. My setup: (XP SP 2), Python 2.5.2. The
    chip is an AMD Turion Mobile which is 64-bit but is running 32-bit
    Windows.

    >>> import os
    >>> from pprint import pprint as pp
    >>> pp(dict((k, v) for (k, v) in os.environ.items() if 'PROCESSOR' in k))

    {'NUMBER_OF_PROCESSORS': '1',
    'PROCESSOR_ARCHITECTURE': 'x86',
    'PROCESSOR_IDENTIFIER': 'x86 Family 15 Model 36 Stepping 2,
    AuthenticAMD',
    'PROCESSOR_LEVEL': '15',
    'PROCESSOR_REVISION': '2402'}
    >>>


    Cheers,
    John
     
    John Machin, Sep 5, 2008
    #3
  4. aha

    Tim Roberts Guest

    aha <> wrote:
    >
    >Dose anyone know of a cross-platform method for determining the vendor
    >of a processor? Under linux I can check /proc/cpuinfo. What I'd like
    >to be able to do is determine if a processor is AMD or Intel, so that
    >I can use the appropriate numerical libraries for my application.


    If you have a numerical library that uses processor-specific instructions,
    then the library must be in C with assembler. If so, just add another
    function that does a "cpuid" instruction and return the results.
    --
    Tim Roberts,
    Providenza & Boekelheide, Inc.
     
    Tim Roberts, Sep 7, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Gerry Viator
    Replies:
    3
    Views:
    576
    Gerry Viator
    Sep 29, 2003
  2. Andreas

    Designing a co-processor

    Andreas, Nov 5, 2003, in forum: VHDL
    Replies:
    0
    Views:
    451
    Andreas
    Nov 5, 2003
  3. YacentY
    Replies:
    11
    Views:
    2,495
    john jakson
    Dec 3, 2003
  4. Replies:
    5
    Views:
    320
    Tor Rustad
    Mar 23, 2005
  5. brahatha
    Replies:
    1
    Views:
    661
Loading...

Share This Page