-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fallback to default while reading MIDR_EL1 sysfs #96
Conversation
/sysfs is inaccessible while running in AWS Lambda environment, or might be empty if executed inside container on Apple Silicon
This time I run |
Thank you for the patch! |
@@ -440,12 +440,16 @@ class CpuInfoLinux : public CpuInfo { | |||
|
|||
FILE *file = fopen(path_midr_el1, "r"); | |||
if (file == nullptr) { | |||
throw Error(ERR_INTERNAL); | |||
// sysfs is unaccessible for AWS Lambdas | |||
fprintf(stderr, "%s, %d: Can't open MIDR_EL1 sysfs entry\n", __FILE__, __LINE__); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose printf
is not needed here, because this code is used in production where such messages are not allowed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sandye51
Thank you for the comment.
How about printfing only when the environment variable XBYAK_AARCH64_VERBOSE is defined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sandye51 hmm, isn't it the same behavior as one allowed by XBYAK_AARCH64_ERROR_
xbyak_aarch64/src/util_impl_linux.h
Line 51 in f43f7e8
#define XBYAK_AARCH64_ERROR_ fprintf(stderr, "%s, %d, Error occured while reading cache infomation.\n", __FILE__, __LINE__); |
/sysfs
is inaccessible while running in AWS Lambda environment, or might be empty if executed inside container on Apple SiliconFound while debugging pytorch/pytorch#115482 to be cherry-picked into oneDNN later