| 179 | static InitCaller inst; |
| 180 | |
| 181 | InitCaller() { |
| 182 | #ifndef WIN32 |
| 183 | if (MGB_GETENV("MGB_REGISTER_SEGV_HANDLER")) { |
| 184 | mgb_log_warn( |
| 185 | "env config MGB_REGISTER_SEGV_HANDLER, which means " |
| 186 | "megbrain will catch crash SEGV signal, if you do not want " |
| 187 | "to megbrain do this, do unset MGB_REGISTER_SEGV_HANDLER " |
| 188 | "and rerun"); |
| 189 | SigHandlerInit::init_for_segv(); |
| 190 | } |
| 191 | #endif |
| 192 | #if MGB_CUDA |
| 193 | CudaCheckOnFork::init(); |
| 194 | #endif |
| 195 | } |
| 196 | }; |
| 197 | InitCaller InitCaller::inst; |
| 198 |