Giter Club home page Giter Club logo

hackerearth-hackathon's Introduction

Intel® oneAPI Hackathon for Open Innovation

Environment set up for various run:

Step 1: Open the condaenvsetup.ipynb and activate Python 3(Intel oneAPI 2022.3) kernel
Step 2: Run through the cells one by one. "qsub" submits the job to do all the setup and "qstat" shows the job status. (all details related to devcloud job submission is in the Welcome.ipyb file)
Step 3: Once the job is finished, the setup should be completed.
Step 4: Now you will have stock-tensorflow as well as intel-tensorflow in the jupyter kernels to run the benchmark code.
Step 5: You will also have intel-modin kernel to run the benchmark code.

Running the notebooks:

Exercise 1: Intel® extension for Pytorch

Step 1: Open terminal and clone oneAPI samples
git clone https://github.com/oneapi-src/oneAPI-samples.git
step 2: Browse oneAPI-samples/AI-and-Analytics/Features-and-Functionality/IntelPyTorch_Extensions_Inference_Optimization/
step 3: Open the optimize_pytorch_models_with_ipex.ipynb
step 4: Activate the Pytorch(AI kit) kernel.
step 5: Run all the cells for to see comparision between baseline pytorch and IPEX optimization features for inference.

Exercise 2: Intel® Tensorflow and Stock Tensorflow Performance Comparison

Step 1: Open terminal, and clone oneAPI samples
git clone https://github.com/oneapi-src/oneAPI-samples.git
Step 2: Browse the oneAPI-samples/AI-and-Analytics/Features-and-Functionality/IntelTensorFlow_ModelZoo_Inference_with_FP32_Int8/
Step 3: Open the ResNet50_Inference.ipynb
Step 4: First select stock-tensorflow kernel and add the following env variable [os.environ["TF_ENABLE_ONEDNN_OPTS"]='0'] to disable onednn and run through each cell of the notebook to get the average time and throughput.
Step 5: Follow step 4 but now with onednn on by changing the env variable [os.environ["TF_ENABLE_ONEDNN_OPTS"]='1'] and note the performance
Step 6: Repeat the same process but this time with intel-tensorflow kernel to add further openmp optimizations and compare the average time and throughput

Exercise 3: Intel® Extension for Scikit-learn

Step 1: Browse the oneAPI-samples/AI-and-Analytics/Features-and-Functionality/Intel_Extension_For_SKLearn_Performance_SVC_Adult/
Step 2: Open the Intel_Extension_for_SKLearn_Performance_SVC_Adult.ipynb
Step 3: Activate the python3(Intel oneAPI 2022.3) kernel. Run through all the cells. This compares both the Intel extension SKLearn with the Unoptimized SKLearn and compares the performance optimization.

Exercise 4: Intel® Distribution for Modin

Step 1: Browse /oneAPI-samples/AI-and-Analytics/Getting-Started-Samples/IntelModin_GettingStarted/
Step 2: Open IntelModin_GettingStarted.ipynb and activate the intel-modin kernel.
Step 3: Run all the cells which has modin and pandas comparision.

Exercise 5: XGBoost Optimized for Intel®

Step 1: Browse /oneAPI-samples/AI-and-Analytics/Features-and-Functionality/IntelPython_XGBoost_Performance/
Step 2: Open IntelPython_XGBoost_Performance.ipynb
Step 3: First activate Python 3(Intel oneAPI 2022.3) kernel and run till 8th cell.
Step 4: Check if perf_numbers.csv file has been created.
Step 5: Now install xgboost=0.81 inside juypter notebook to change the xgboost version.
Step 6: Run all the cell again to see performace comparision.

Documentation Links:

Intel® Devcloud for oneAPI documentation https://devcloud.intel.com/oneapi/get_started/

Intel® oneapi AI Analytics toolkit - Documentation https://www.intel.com/content/www/us/en/developer/tools/oneapi/ai-analytics-toolkit.html#gs.kgt57v

Intel® extension for Pytorch* https://intel.github.io/intel-extension-for-pytorch/cpu/latest/

Intel® Optimization for TensorFlow* https://www.intel.com/content/www/us/en/developer/tools/oneapi/optimization-for-tensorflow.html

Intel® Extension for Scikit-learn* https://www.intel.com/content/www/us/en/developer/tools/oneapi/scikit-learn.html#gs.ki3i07

Intel® Distribution of Modin* https://www.intel.com/content/www/us/en/developer/tools/oneapi/distribution-of-modin.html#gs.ki3gje

XGBoost Optimized for Intel® https://www.intel.com/content/www/us/en/developer/articles/technical/xgboost-optimized-architecture-getting-started.html

hackerearth-hackathon's People

Contributors

vasud-ha avatar nazneenn avatar

Stargazers

Santhosh (Sandy Inspires) avatar Akhmad As'ad avatar abdul h.m avatar Abdul Hafidz avatar Ernitia Paramasari avatar  avatar Mr. Nitin Mane  avatar

Watchers

 avatar SkylineTech  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.