This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #### omnitrace :: executing 'python3 -m omnitrace -- rms_norm.py'... ##### | |
| [omnitrace]> profiling: ['/home/anupamb/rms_norm.py'] | |
| [omnitrace][1488305][omnitrace_init_tooling] Instrumentation mode: Trace | |
| ______ .___ ___. .__ __. __ .___________..______ ___ ______ _______ | |
| / __ \ | \/ | | \ | | | | | || _ \ / \ / || ____| | |
| | | | | | \ / | | \| | | | `---| |----`| |_) | / ^ \ | ,----'| |__ | |
| | | | | | |\/| | | . ` | | | | | | / / /_\ \ | | | __| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ``` | |
| $ omnitrace-instrument -- ./rms_norm.par | |
| [omnitrace][exe] | |
| [omnitrace][exe] command :: '/home/anupamb/rms_norm.par'... | |
| [omnitrace][exe] | |
| [omnitrace][exe] DYNINST_API_RT: /home/anupamb/omnitrace/lib/omnitrace/libdyninstAPI_RT.so | |
| ^C | |
| [omnitrace][318773][0] Signal 2 caught : Interrupt (Signal sent by the kernel 0 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ❯ omniperf profile -n vcopy_all -- ./vcopy -n 1048576 -b 256 | |
| ROC Profiler: /opt/rocm-6.0.0/bin/rocprof | |
| Execution mode = profile | |
| ___ _ __ | |
| / _ \ _ __ ___ _ __ (_)_ __ ___ _ __ / _| | |
| | | | | '_ ` _ \| '_ \| | '_ \ / _ \ '__| |_ | |
| | |_| | | | | | | | | | | |_) | __/ | | _| | |
| \___/|_| |_| |_|_| |_|_| .__/ \___|_| |_| | |
| |_| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import torch | |
| import torch.nn as nn | |
| import torch.optim as optim | |
| from torch.profiler import profile, schedule, tensorboard_trace_handler, ProfilerActivity | |
| class Xor(nn.Module): | |
| def __init__(self): | |
| super(Xor, self).__init__() | |
| self.fc1 = nn.Linear(2, 3, True) | |
| self.fc2 = nn.Linear(3, 1, True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| You are given a positive integer n, you can do the following operation any number of times: | |
| - Add or subtract a power of 2 from n. | |
| Return the minimum number of operations to make n equal to 0. | |
| A number x is power of 2 if x == 2^i where i >= 0. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-devel | |
| RUN apt update | |
| ENV DEBIAN_FRONTEND=noninteractive | |
| RUN apt install -y curl tmux wget | |
| # install rust | |
| RUN curl https://sh.rustup.rs -sSf | sh -s -- -y | |
| ENV PATH="$HOME/.cargo/env:${PATH}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Launch container and enter shell | |
| docker run --rm -it <image_name> | |
| # Create image from docker file | |
| docker build -t <image_name:tag> -f /path/to/dockerfile . | |
| # Create image from running container | |
| docker commit <container_id> <account_name/image_name:tag> | |
| # Push image to docker hub |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git checkout --orphan new-branch | |
| git add -u | |
| git commit -m 'first commit' | |
| git branch -D main // delete main | |
| git branch -m main // rename new-branch to main | |
| git push -f origin main // force push main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="{{ page.lang | default: site.lang | default: "en" }}"> | |
| {%- include head.html -%} | |
| {%- include mathjax.html -%} | |
| <body> | |
| {%- include header.html -%} | |
| <main class="page-content" aria-label="Content"> |