Skip to content
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

Deal with deprecated AVX2 feature (and possibly others) #237

Open
appleby opened this issue Jan 26, 2020 · 5 comments
Open

Deal with deprecated AVX2 feature (and possibly others) #237

appleby opened this issue Jan 26, 2020 · 5 comments
Labels
discussion/proposal Something to discuss before implementing. good first issue Good for newcomers

Comments

@appleby
Copy link
Contributor

appleby commented Jan 26, 2020

It looks like the upcoming sbcl 2.0.1 release includes changes to move certain symbols out of cl:*features* and into sb-impl:+internal-features+ [1]. IIUC, any "non-public" features will continue to work (for now), but issue a warning [2].

I haven't tested it, but it looks like we use at least one such soon-to-be-deprecated feature, namely avx2. We should figure out what to do about our usage of any "internal" features.

Options include:

  1. Do nothing, ignore the warnings, and hope they remain deprecated for at least a decade :-)
  2. Kindly ask SBCL maintainers to keep avx2 in *features*
  3. If possible, find some other combination of public features that are equivalent
  4. Hack around it
  5. Who cares, everybody has a modern x86-64 processor, right?
@appleby appleby added discussion/proposal Something to discuss before implementing. good first issue Good for newcomers labels Jan 26, 2020
@colescott
Copy link
Member

Update: sbcl 2.0.1 removed the avx2 feature flag.

The main issue this brings up is that the if-feature flag in the asdf file cannot tell that we have avx enabled. Maybe there is some other way of conditionalizing loading the files.

@jmbr
Copy link
Contributor

jmbr commented Apr 1, 2020

The AVX2 flag seems to be alive and kicking in 2.0.3 (see sbcl/sbcl@b01dce7 for instance).

@appleby
Copy link
Contributor Author

appleby commented Apr 1, 2020

It was moved out of cl:*features* and into sb-impl:+internal-features+, and sb-int:featurep was changed to warn and return nil for internal features. Maybe whatever is checking local-target-features in the sbcl build knows to include +internal-features+?

CL-USER> (lisp-implementation-type)
"SBCL"
CL-USER> (lisp-implementation-version)
"2.0.3"
CL-USER> #+avx2 :avx2
WARNING: :AVX2 is no longer present in *FEATURES*
; No value
CL-USER> #-avx2 :avx2
WARNING: :AVX2 is no longer present in *FEATURES*
:AVX2
CL-USER> (find :avx2 *features*)
NIL
CL-USER> (find :avx2 sb-impl:+internal-features+)
:AVX2

@appleby
Copy link
Contributor Author

appleby commented Apr 1, 2020

In the original issue description, I incorrectly assumed that SBCL would still respect sb-impl:+internal-features+ for feature expressions, but apparently it just issues the warning.

@jmbr
Copy link
Contributor

jmbr commented Apr 1, 2020

Yeah, I've been looking at featurep too. This is a nuisance indeed. I've seen a couple of instances in the code where they do a union of *features* and +internal-features+ (during bootstrap). Perhaps we could do that or we could redefine sharp-plus-minus in src/code/sharpm.lisp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion/proposal Something to discuss before implementing. good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants