我正在尝试在Windows上安装Pytorch,并且正在使用官方网站的命令 https://pytorch.org/get-started/locally/
pip3 install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
Run Code Online (Sandbox Code Playgroud)
如果选择Windows,Cuda 10.0和Python 3.7,这是命令,但是如果运行此命令,则会收到错误消息:
ERROR: Could not find a version that satisfies the requirement torch==1.2.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.2.0
Run Code Online (Sandbox Code Playgroud)
那么为什么会这样呢?我的pip版本是19.2,我在新安装的python 3.7环境中
openmp的这两种实现之间有区别吗?
float dot_prod (float* a, float* b, int N)
{
float sum = 0.0;
#pragma omp parallel for shared(sum)
for (int i = 0; i < N; i++) {
#pragma omp critical
sum += a[i] * b[i];
}
return sum;
}
Run Code Online (Sandbox Code Playgroud)
和相同的代码但第 4 行没有 shared(sum) 因为 sum 已经初始化?
#pragma omp parallel for
for(int = 0; ....)
Run Code Online (Sandbox Code Playgroud)
openmp 中 private 的相同问题:
是
void work(float* c, int N)
{
float x, y; int i;
#pragma omp parallel for private(x,y)
for (i = …Run Code Online (Sandbox Code Playgroud)