Open appleby opened 4 years ago
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.
The AVX2 flag seems to be alive and kicking in 2.0.3 (see https://github.com/sbcl/sbcl/commit/b01dce77d6a27d31e203adc33e484c64f2de46f0 for instance).
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
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.
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
.
It looks like the upcoming sbcl 2.0.1 release includes changes to move certain symbols out of
cl:*features*
and intosb-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?