8000 PTB beta update Psychtoolbox 3.0.20.1 "Appletizer SP1" by kleinerm · Pull Request #856 · Psychtoolbox-3/Psychtoolbox-3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

PTB beta update Psychtoolbox 3.0.20.1 "Appletizer SP1" #856

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Jan 12, 2025
Merged

Conversation

kleinerm
Copy link

Compatibility changes wrt. Psychtoolbox 3.0.20.0:

  • None

Highlights:

  • None

macOS:

  • Psychtoolbox was built and tested against native Matlab R2024b and against native
    Octave 9.3 from HomeBrew, on macOS 13.7.1 Ventura for Intel Macs, and on macOS 14.5
    Sonoma for Apple Silicon Macs.

  • Try to execute same code path on Apple Silicon macOS, regardless if running under native
    Matlab/Octave for Apple Silicon ARM, or running under Intel Matlab/Octave via Rosetta2
    emulation. Our license management aggregate stats tell us that a non-trivial fraction of users
    still use Matlab for Intel Macs via Rosetta2 emulation on Apple Silicon, instead of the recommended
    native Matlab/Octave for Apple Silicon. This would cause PTB to misbehave, as it would think it runs
    on an Intel Mac and acts accordingly, instead of adapting to the special snowflake that is macOS on
    Apple Silicon. This will especially cause trouble with visual stimulation timing and some visual stimulus
    presentation. Note that this fix tries to fix this, but Psychtoolbox is not and will not be tested for proper
    compatibility and quality when running under Matlab/Octave for Intel via Rosetta2 on Apple Silicon!
    Switching to native Matlab/Octave for Apple Silicon / ARM is strongly recommended.

  • Audio demos and tests: Request standard latency instead of larger latency on Apple Silicon.
    The lose latency requirement was only meant to accomodate RaspberryPi's, not Apple Silicon.

Resync with initial Psychtoolbox 3.0.20.0 "Appletizer" release.
Normally IsARM() reports the architecture for which the Octave/Matlab scripting
language runtime - and Psychtoolbox mex files in use - are compiled for, ie. if that
target architecture is ARM or not. However, emulation layers like Rosetta2 on macOS
allow running a Matlab/Octave/Mex file for Intel Macs to run on ARM Macs, and so
the reported IsARM() state may be inappropriate for some decision making.

The new optional parameter IsARM(1) now queries true host architecture, even
in case of Rosetta2 emulation, so we can treat Apple Silicon even when operated
from executables originally targeted at non-ARM Intel hardware.

The detection logic is not yet implemented for Linux (cfe. FEX-Emu or Box64) or
Windows on ARM's emulation layer. That's a todo for the future, but not as
urgent as is for macOS atm.
…tta2.

Use the new query function to make sure Apple Silicon systems are treated as such,
even when operated from a PTB for IntelMacs running under Octave/Matlab for
IntelMacs.

While this should help those users running Matlab for IntelMacs on their Apple
Silicon, note that PTB has not and will not be carefully tested for proper working
under such configurations. It's more of a step-gap.
IsARM() is insufficient to decide if latency requirements should be loosened.
The assumption was that IsARM == RaspberryPi, but now IsARM can also mean
rather powerful Apple Silicon ARM SoC's like M1/M2/M3/M4/... and those do not
need loose latency requirements. So only loosen if ARM + Linux. This is still a bit
ham fisted as there are many other ARM SoC's under Linux than RaspberryPi
which are swept up in this wide net. Baby steps.
@kleinerm kleinerm merged commit fc7a13d into beta Jan 12, 2025
1 check passed
kleinerm added a commit that referenced this pull request Jan 12, 2025
Resync with public 3.0.20.1 release.

Merge pull request #856 from Psychtoolbox-3/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0