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
public static <T> boolean verifyApproximateDp( | |
T[] samplesA, T[] samplesB, double epsilon, double delta, double deltaTolerance) { | |
Map<T, Long> histogramA = buildHistogram(samplesA); | |
Map<T, Long> histogramB = buildHistogram(samplesB); | |
double testValueA = computeAproximateDpTestValue(histogramA, histogramB, epsilon, samplesA.length); | |
double testValueB = computeAproximateDpTestValue(histogramB, histogramA, epsilon, samplesA.length); | |
return testValueA < delta + deltaTolerance && testValueB < delta + deltaTolerance; | |
} | |
private static <T> double computeAproximateDpTestValue( |
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
function open_build_in_vsplit() | |
local current_filepath = vim.fn.expand('%:p:h') | |
local current_filename = vim.fn.expand('%:t') | |
vim.api.nvim_command('vsp ' .. current_filepath .. "/BUILD") | |
vim.api.nvim_command('/' .. current_filename) | |
end | |
vim.keymap.set('n', '<leader>vb', ':lua open_build_in_vsplit()<CR>') |
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 numpy as np | |
def poly_mul(a, b): | |
a_preprocessed = np.concatenate([a, -a], dtype=np.complex64) | |
b_preprocessed = np.concatenate([b, -b], dtype=np.complex64) | |
a_ft = np.fft.fft(a_preprocessed) | |
b_ft = np.fft.fft(b_preprocessed) | |
prod = a_ft * b_ft | |
np_fft_mul = np.round(0.5 * np.real(np.fft.ifft(prod))).astype(np.int64) |
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 numpy as np | |
import math | |
def primitive_nth_root(n): | |
"""Return a primitive nth root of unity.""" | |
return math.cos(2 * math.pi / n) + 1.0j * math.sin(2 * math.pi / n) | |
def poly_mul(a, b): |
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 numpy as np | |
import math | |
def primitive_nth_root(n): | |
"""Return a primitive nth root of unity.""" | |
return math.cos(2 * math.pi / n) + 1.0j * math.sin(2 * math.pi / n) | |
def poly_mul(a, b): |
This file has been truncated, but you can view the full file.
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
module for_17083425188857115422( | |
input wire signed [7:0] arg1, | |
input wire signed [7:0] arg2, | |
input wire signed [31:0] arg3, | |
output wire signed [31:0] _out_ | |
); | |
wire signed [15:0] v4; | |
wire signed [15:0] v5; | |
wire signed [15:0] v6; | |
wire signed [31:0] v7; |
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
workspace(name = "xls_repro") | |
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
# Install XLS and its transitive dependencies. | |
http_archive( | |
name = "com_google_xls", | |
sha256 = "c0653f9e3979e311ef9c8660d13f60d1217d9830fdb22011d22954a429f898e5", | |
strip_prefix = "xls-dce44c5c896773c85c2b8078f9d38d7b8b39912e", | |
url = "https://github.com/google/xls/archive/dce44c5c896773c85c2b8078f9d38d7b8b39912e.tar.gz", |
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
/* Autogenerated by mlir-tblgen; don't manually edit */ | |
#ifdef GEN_PASS_DECL | |
// Generate declarations for all passes. | |
#define GEN_PASS_DECL_AFFINEFULLUNROLL | |
#define GEN_PASS_DECL_AFFINEFULLUNROLLPATTERNREWRITE | |
#undef GEN_PASS_DECL | |
#endif // GEN_PASS_DECL | |
//===----------------------------------------------------------------------===// |
This file has been truncated, but you can view the full file.
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
cmake_minimum_required(VERSION 2.8.8) | |
project(b'bug') | |
add_library(_2 OBJECT | |
/home/j2kun/fhe/bug/external/llvm-project/mlir/include/mlir/Dialect/GPU/IR/CompilationInterfaces.h | |
/usr/include/c++/11/system_error | |
/home/j2kun/fhe/bug/bazel-out/k8-fastbuild/bin/external/llvm-project/mlir/_virtual_includes/OpenACCOpsIncGen/mlir/Dialect/OpenACC/OpenACCOpsDialect.h.inc | |
/home/j2kun/fhe/bug/external/llvm-project/mlir/include/mlir/Conversion/ArithToLLVM/ArithToLLVM.h | |
/home/j2kun/fhe/bug/bazel-out/k8-fastbuild/bin/external/llvm-project/mlir/_virtual_includes/IRDLTypesIncGen/mlir/Dialect/IRDL/IR/IRDLTypesGen.h.inc | |
/home/j2kun/fhe/bug/external/llvm-project/llvm/include/llvm/ADT/MapVector.h |
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
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ | |
|* *| | |
|* TypeDef Definitions *| | |
|* *| | |
|* Automatically generated file, do not edit! *| | |
|* *| | |
\*===----------------------------------------------------------------------===*/ | |
#ifdef GET_TYPEDEF_LIST | |
#undef GET_TYPEDEF_LIST |