Comments (2)
Thanks for reporting. Will be fixed later.
from spu.
sounds good.
I found a temporary workaround by changing the sign calculation from A_sign = A > 0
and B_sign = B > 0
to A_sign = A > x1[5]
and B_sign = B > x1[5]
, where x1[5]
is initialized to be always 0
.
def my_compare(x1, x2):
A = x1[3]*x2[3]*(x1[0]*x2[1]-x2[0]*x1[1])+x1[1]*x2[1]*(x1[2]*x2[3]-x2[2]*x1[3])
B = x1[1]*x1[3]*x2[1]*x2[3]
A_sign = A > x1[5]
B_sign = B > x1[5]
z = jnp.logical_xor(A_sign, B_sign)
zz_0 = jax.lax.select(z, x2[0], x1[0])
zz_1 = jax.lax.select(z, x2[1], x1[1])
zz_2 = jax.lax.select(z, x2[2], x1[2])
zz_3 = jax.lax.select(z, x2[3], x1[3])
zz_4 = jax.lax.select(z, x2[4], x1[4])
zz_5 = jax.lax.select(z, x2[5], x1[5])
return [zz_0,zz_1,zz_2,zz_3,zz_4,zz_5]
from spu.
Related Issues (20)
- [Bug]: Dear teachers, when i try to use spu on torch, i found a problem HOT 7
- [Question]: overflow and underflow HOT 3
- [Feature]: Can we profiling the round complexity of each primitives? HOT 1
- [Bug]: 安装时报除0错误 HOT 3
- 执行beaver服务器时,出现问题 HOT 5
- LLaMAConfig缺少 HOT 3
- [Question]: protocol for secure bit-wise comparison in Cheetah HOT 7
- [Bug]: squirrel experiment HOT 1
- [Question]: how are signed integers represented as fixed point binary values in SPU? HOT 3
- [Bug]: when i use spu, it errors as follows "keyboardInterrrupt", but i did not use ctrl+c to end it HOT 5
- [Bug]: when i install secretflow using " pip install -U secretflow", it report errors as follows
- [Bug]: hello, could you please tell me some advice on the code location of "Ditto: Quantization-aware Secure Inference of Transformers upon MPC" HOT 16
- [Bug]: root/.cache/bazel/_bazel_root/5fb069ff7e8788e0e7d803c89624f2bc/execroot/spulib/bazel-out/k8-fastbuild/bin/spu/tests/jnp_dynamic_ring_test.runfiles/spulib/spu/tests/jnp_dynamic_ring_test.py", line 15, in <module> import jax ModuleNotFoundError: No module named 'jax' HOT 2
- [Bug]: When i use the following code and change the FlaxGPT2Block to float16" ", it output "I enjoy walking with my cute dog cement Facility Users LankaPHOTOS henceitial periodsGener observations HOT 2
- [Bug]: ERROR: Build failed. Not running target HOT 2
- [Bug]: dear teachers, i wanna to test the time proportion of softmax、gelu in gpt2, could you please give me some advice
- [Bug]: dear teachers, how to test the runtime using secretflow in lan and wan environment, could you please give me some advice on setting the lan and wan HOT 4
- [Bug]: flax_gpt2 produces wrong results when using semi2k with a custom MatMulAA operator HOT 3
- [Bug][Critical] Mistaking the source/dst copy in the PackedB2A implementation HOT 1
- [Bug]: types do not equal HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from spu.