Skip to content

Does oneDNN has locale limitations? #3181

Open
@dan20210809

Description

@dan20210809

Hi, oneDNN developers

I am using OpenVINO2025.1 to do dGPU (A770) inference, but I found if I set:
std::locale::global(std::locale("chs"));
or
std::locale::global(std::locale("En_US"));
or
std::locale::global(std::locale(""));
The inference will crash on oneDNN, but If I removed the locale set, the inference will be fine.
This is part of the crash log:

1:153:23: note: expanded from macro '
CONCAT2'
#define CONCAT2(a, b) CONCAt2(a, b)
^
note: (skipping 7 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
1:152:23: note: expanded from macro 'CONCAt2'
#define CONCAt2(a, b) a##b
^
:213:1: note: expanded from here
PO_0_ELTWISE_SCALE
^
:329:29: note: expanded from here
#define PO_0_ELTWISE_SCALE as_float(0x3f,800,000)
^
1:12553:18: warning: left operand of comma operator has no effect
const off_t oh = GWS_GET_OH();
^~~~~~~~~~~~
:27:21: note: expanded from here
#define GWS_GET_OH GWS0_GET_ID2
^
1:887:63: note: expanded from macro 'GWS0_GET_ID2'
#define GWS0_GET_ID2() GWS0_OP2(GWS_GET_THREAD_ID(GWS0_IDX2), GWS0_STRIDE2, div_up(GWS0_DIM2, GWS0_BLOCK2)) / GWS0_VEC_SIZE2 * GWS0_VEC_SIZE2 * GWS0_BLOCK2
^~~~~~~~~~~~
:145:23: note: expanded from here
#define GWS0_STRIDE2 4,608
^
1:884:48: note: expanded from macro 'GWS_OP_MOD'
#define GWS_OP_MOD(idx, stride, max) ((idx) / (stride) % (max))
^~~~~~
,src\gpu\intel\ocl\engine.cpp:174
onednn_verbose,v1,primitive,error,ocl,errcode -11,CL_BUILD_PROGRAM_FAILURE,src\gpu\intel\ocl\engine.cpp:278,src\gpu\intel\ocl\engine.cpp:278

Just want to know how can I fix this, I have to set the locale because I have a lot of chinese logs in the appliation, and without locale set, the log will be unreadable.

Thanks.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions