|
254 | 254 | "outputs": [],
|
255 | 255 | "source": [
|
256 | 256 | "print(\"Training model with FP32\")\n",
|
| 257 | + "os.environ[\"ONEDNN_MAX_CPU_ISA\"] = \"AVX512_CORE_AMX\"\n", |
257 | 258 | "fp32_training_time = trainModel(train_loader, modelName=\"fp32\", dataType=\"fp32\")"
|
258 | 259 | ]
|
259 | 260 | },
|
260 |
| - { |
261 |
| - "cell_type": "code", |
262 |
| - "execution_count": null, |
263 |
| - "id": "75aafe25-4f7d-42ad-92ed-3438bd78c00b", |
264 |
| - "metadata": {}, |
265 |
| - "outputs": [], |
266 |
| - "source": [ |
267 |
| - "print(\"Training model with BF16 with AVX512\")\n", |
268 |
| - "!python pytorch_training_avx512_bf16.py" |
269 |
| - ] |
270 |
| - }, |
271 | 261 | {
|
272 | 262 | "cell_type": "code",
|
273 | 263 | "execution_count": null,
|
274 | 264 | "id": "a9bd6dec",
|
275 | 265 | "metadata": {},
|
276 | 266 | "outputs": [],
|
277 | 267 | "source": [
|
278 |
| - "# Record the training time for BF16 using AVX512\n", |
279 |
| - "bf16_avx512_training_time = None #TODO: enter in training time" |
| 268 | + "print(\"Training model with BF16 with AVX512\")\n", |
| 269 | + "os.environ[\"ONEDNN_MAX_CPU_ISA\"] = \"AVX512_CORE_BF16\"\n", |
| 270 | + "bf16_avx512_training_time = trainModel(train_loader, modelName=\"bf16_noAmx\", dataType=\"bf16\")" |
280 | 271 | ]
|
281 | 272 | },
|
282 | 273 | {
|
|
287 | 278 | "outputs": [],
|
288 | 279 | "source": [
|
289 | 280 | "print(\"Training model with BF16 with Intel® AMX\")\n",
|
| 281 | + "os.environ[\"ONEDNN_MAX_CPU_ISA\"] = \"AVX512_CORE_AMX\"\n", |
290 | 282 | "bf16_amx_training_time = trainModel(train_loader, modelName=\"bf16_withAmx\", dataType=\"bf16\")"
|
291 | 283 | ]
|
292 | 284 | },
|
|
391 | 383 | ],
|
392 | 384 | "metadata": {
|
393 | 385 | "kernelspec": {
|
394 |
| - "display_name": "Python 3.8.10 64-bit (microsoft store)", |
| 386 | + "display_name": "pytorch", |
395 | 387 | "language": "python",
|
396 |
| - "name": "python3" |
| 388 | + "name": "pytorch" |
397 | 389 | },
|
398 | 390 | "language_info": {
|
399 | 391 | "codemirror_mode": {
|
|
405 | 397 | "name": "python",
|
406 | 398 | "nbconvert_exporter": "python",
|
407 | 399 | "pygments_lexer": "ipython3",
|
408 |
| - "version": "3.8.10" |
| 400 | + "version": "3.11.0" |
409 | 401 | },
|
410 | 402 | "vscode": {
|
411 | 403 | "interpreter": {
|
|
0 commit comments