Skip to content

Instantly share code, notes, and snippets.

View giuliacassara's full-sized avatar
🎯
Training

Giulia Cassarà giuliacassara

🎯
Training
View GitHub Profile
module attributes {torch.debug_module_name = "GraphModule"} {
func private @__torch__.torch.fx.graph_module.___torch_mangle_0.GraphModule.forward(%arg0: !torch.nn.Module<"__torch__.torch.fx.graph_module.___torch_mangle_0.GraphModule">, %arg1: !torch.tensor {torch.type_bound = !torch.vtensor<[50257,768],f32>}, %arg2: !torch.tensor {torch.type_bound = !torch.vtensor<[2304],f32>}, %arg3: !torch.tensor {torch.type_bound = !torch.vtensor<[768,2304],f32>}, %arg4: !torch.tensor {torch.type_bound = !torch.vtensor<[768],f32>}, %arg5: !torch.tensor {torch.type_bound = !torch.vtensor<[768,768],f32>}, %arg6: !torch.tensor {torch.type_bound = !torch.vtensor<[768],f32>}, %arg7: !torch.tensor {torch.type_bound = !torch.vtensor<[768],f32>}, %arg8: !torch.tensor {torch.type_bound = !torch.vtensor<[768],f32>}, %arg9: !torch.tensor {torch.type_bound = !torch.vtensor<[768],f32>}, %arg10: !torch.tensor {torch.type_bound = !torch.vtensor<[3072],f32>}, %arg11: !torch.tensor {torch.type_bound = !torch.vtensor<[768,3072],f32>}, %ar
@DeNeutoy
DeNeutoy / app.py
Created February 17, 2020 17:41
scispacy demo
import streamlit as st
import spacy
from spacy import displacy
import pandas as pd
from scispacy.umls_linking import UmlsEntityLinker
from scispacy.abbreviation import AbbreviationDetector
SPACY_MODEL_NAMES = ["en_core_sci_sm", "en_core_sci_md", "en_core_sci_lg"]
@carlthome
carlthome / tfcompile.ipynb
Last active October 11, 2022 16:14
Example of how to use XLA AOT via tfcompile to build a Keras model into a shared library.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kmhofmann
kmhofmann / building_tensorflow.md
Last active March 2, 2024 18:37
Building TensorFlow from source

Building TensorFlow from source (TF 2.3.0, Ubuntu 20.04)

Why build from source?

The official instructions on installing TensorFlow are here: https://www.tensorflow.org/install. If you want to install TensorFlow just using pip, you are running a supported Ubuntu LTS distribution, and you're happy to install the respective tested CUDA versions (which often are outdated), by all means go ahead. A good alternative may be to run a Docker image.

I am usually unhappy with installing what in effect are pre-built binaries. These binaries are often not compatible with the Ubuntu version I am running, the CUDA version that I have installed, and so on. Furthermore, they may be slower than binaries optimized for the target architecture, since certain instructions are not being used (e.g. AVX2, FMA).

So installing TensorFlow from source becomes a necessity. The official instructions on building TensorFlow from source are here: ht