This file contains 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 ctypes | |
def print_binary_val(tensor): | |
print(bin(ctypes.c_uint.from_buffer(ctypes.c_float(tensor.item())).value)) | |
# Error 1: Large round-off incurred when | |
# representing the same number in a lower precision. | |
A = torch.tensor(1.0001, dtype=torch.float32).cuda() | |
B = A.half() |
This file contains 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
pld_dir?=/media/lilbirb/research/code/pld/ | |
src=$(pld_dir)/do_blink/symbiflow_benchmark/fig2_at200/1600/src | |
base=$(abspath .) | |
symb_dir?=$(pld_dir)/third_party/symbiflow-arch-defs | |
do_blink_dir?=$(pld_dir)/build/do_blink/rrgraphs | |
YOSYS = $(symb_dir)/env/conda/envs/symbiflow_arch_def_base/bin/yosys | |
VPR?=$(pld_dir)/third_party/vtr-verilog-to-routing/vpr/vpr | |
GENFASM = $(symb_dir)/env/conda/envs/symbiflow_arch_def_base/bin/genfasm | |
XCFASM = $(symb_dir)/env/conda/envs/symbiflow_arch_def_base/bin/xcfasm |
This file contains 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
set_property DONT_TOUCH true [get_cells design_1_i/page_0/inst] | |
set_property HD.RECONFIGURABLE true [get_cells design_1_i/page_0/inst] | |
set_property DONT_TOUCH true [get_cells design_1_i/leaf_dummy_2/inst] | |
set_property HD.RECONFIGURABLE true [get_cells design_1_i/leaf_dummy_2/inst] | |
set_property DONT_TOUCH true [get_cells design_1_i/leaf_dummy_3/inst] | |
set_property HD.RECONFIGURABLE true [get_cells design_1_i/leaf_dummy_3/inst] | |
set_property DONT_TOUCH true [get_cells design_1_i/leaf_dummy_4/inst] | |
set_property HD.RECONFIGURABLE true [get_cells design_1_i/leaf_dummy_4/inst] | |
set_property DONT_TOUCH true [get_cells design_1_i/leaf_dummy_5/inst] |
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <sys/socket.h> | |
#include <linux/if_alg.h> | |
#include <linux/socket.h> | |
#define SHA384_DIGEST_SZ 48 | |
int main(void) { |
This file contains 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
#ifndef _APINT | |
#define _APINT | |
#define NULL __null | |
template <int Bits> | |
using ap_uint = __attribute__((__ap_int(Bits))) unsigned ; | |
template <int Bits> | |
using ap_int = __attribute__((__ap_int(Bits))) int ; |
This file contains 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
\documentclass{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage{enumitem} | |
\title{ESE-532 Homework 1} | |
\author{James Bond \\ Partner: Donald Duck} | |
\date{\today} | |
\begin{document} | |
\maketitle |
This file contains 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 ubuntu:18.04 | |
ARG PYTHON_VERSION=3.6 | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
ca-certificates wget \ | |
gnupg2 \ | |
build-essential \ | |
cmake \ | |
git \ | |
curl \ |
This file contains 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
diff --git a/test/common_quantization.py b/test/common_quantization.py | |
index 188fbf200..13dbc6358 100644 | |
--- a/test/common_quantization.py | |
+++ b/test/common_quantization.py | |
@@ -55,6 +55,10 @@ class QuantizationTestCase(TestCase): | |
self.train_data = [(torch.rand(20, 5, dtype=torch.float), torch.randint(0, 1, (20,), dtype=torch.long)) for _ in range(20)] | |
self.img_data = [(torch.rand(20, 3, 10, 10, dtype=torch.float), torch.randint(0, 1, (20,), dtype=torch.long)) | |
for _ in range(20)] | |
+ fullname = self.id().lower() | |
+ is_cuda_test = 'gpu' in fullname or 'cuda' in fullname or 'cuda' in torch.tensor([]).device.type |
This file contains 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
diff --git a/aten/src/ATen/CPUGenerator.cpp b/aten/src/ATen/CPUGenerator.cpp | |
index c0b6e30..97cbb4d 100644 | |
--- a/aten/src/ATen/CPUGenerator.cpp | |
+++ b/aten/src/ATen/CPUGenerator.cpp | |
@@ -50,6 +50,7 @@ inline uint64_t make64BitsFrom32Bits(uint32_t hi, uint32_t lo) { | |
CPUGenerator::CPUGenerator(uint64_t seed_in) | |
: Generator{Device(DeviceType::CPU)}, | |
engine_{seed_in}, | |
+ engine2{seed_in, 0, 0}, | |
next_float_normal_sample_{c10::optional<float>()}, |
NewerOlder