Author Topic: AVX safe FFmpeg  (Read 24216 times)

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5088
  • Karma: +117/-1
    • View Profile
Re: AVX safe FFmpeg
« Reply #15 on: February 19, 2021, 08:56:04 pm »
You might want to try linking with wl.exe (wlink) as it seems to me the linker handles larger alignment

Unfortunately, wlink/wl  does not have an option/command to set  "between parts alignment"  within object.

Does it need it? The version I built previously used wl for linking and seemed to align stuff correctly, though I guess maybe a coincidence.

OS4User

  • Sr. Member
  • ****
  • Posts: 406
  • Karma: +10/-0
    • View Profile
Re: AVX safe FFmpeg
« Reply #16 on: February 19, 2021, 10:53:46 pm »
You might want to try linking with wl.exe (wlink) as it seems to me the linker handles larger alignment

Unfortunately, wlink/wl  does not have an option/command to set  "between parts alignment"  within object.

Does it need it? The version I built previously used wl for linking and seemed to align stuff correctly, though I guess maybe a coincidence.

Data for  AVX instruction can be situated in many places, for .ex  - stack, dynamically allocated memory, static vars, etc.

I am speaking about static variables now. Our last GCC is able generate  proper .obj files with necessary  alignments. But if final data object  in LX module  is linked from parts (from several files)    we can meet and we indeed meet   wrong alignment.

Compiler reflects in obj file a demand that  it has to be linked with previous file  with certain alignment    in case current file  contains  data with specific alignment.

But not in our case. Historically, GCC for OS/2  uses a.out  as object format. A.out  is not able to carry info about requested alignment  to linker   that is why  we meet  wrong alignment in final binary.

The  best solution  is  to use  ELF  format  for objects files  (it requested a lot of time  for coding and fixing  GCC for OS/2).    One more way  -  could be just request  from linker   to  link every data parts  with 64 bytes align -  but wlink does not have such option/command -  so no way here.




Dave Yeo

  • Hero Member
  • *****
  • Posts: 5088
  • Karma: +117/-1
    • View Profile
Re: AVX safe FFmpeg
« Reply #17 on: February 27, 2021, 09:01:24 am »
There's a new version uploaded to netlabs-exp. To quote,
Quote
I've uploaded a new version 4.2.2-4 to netlabs-exp with -fno-common --disable-avx2 --disable-avx512. Note that I still use --disable-avx2 because of my current assumption that it is not safe to generate AVX2 code w/o a proper alignment support from GCC (see my comment above). I guess that it works for you now just by accident.

Closing this. Please feel free to reopen if the new RPMs don't work for you.
untested here.

Igor

  • Full Member
  • ***
  • Posts: 100
  • Karma: +12/-0
    • View Profile
Re: AVX safe FFmpeg
« Reply #18 on: March 01, 2021, 06:30:44 pm »
Hi, Dave

This version doesn't work for me...

Failing Instruction
_____________________________________________________________________

1261D064 >DB 0xc5                   (c5)
1261D065  CLD                       (fc)
1261D066  SUB     [0x1261cdf0], AH  (2825 f0cd6112)
1261D06C  DB 0xc5                   (c5)

And yet my assemblies are working.

There's a new version uploaded to netlabs-exp. To quote,
Quote
I've uploaded a new version 4.2.2-4 to netlabs-exp with -fno-common --disable-avx2 --disable-avx512. Note that I still use --disable-avx2 because of my current assumption that it is not safe to generate AVX2 code w/o a proper alignment support from GCC (see my comment above). I guess that it works for you now just by accident.

Closing this. Please feel free to reopen if the new RPMs don't work for you.
untested here.

Igor

  • Full Member
  • ***
  • Posts: 100
  • Karma: +12/-0
    • View Profile
Re: AVX safe FFmpeg
« Reply #19 on: March 01, 2021, 06:39:05 pm »
I believe that a successful build with AVX is an accident and I suggest disabling the AVX code until the link is fixed.

HankStarr

  • Guest
Re: AVX safe FFmpeg
« Reply #20 on: October 11, 2021, 10:22:34 am »
Hi...Naturally, Prime95 consequently chooses the most up to date guidance set augmentation, like AVX, AVX2, or even AVX-512. To change this conduct, Prime95 should be begun and totally shut down again once. This will make the local.txt document. In it, prohibitions are alloted a worth of 0, though the code way that will be tried is appointed a worth of 1. In case you're not clear regarding which SSE adaptation is upheld by your CPU, both can be set to 1. Prime95 will pick the right fallback.