最近学Deep Learning感觉chatgpt写code太爽了,码工可以进历史垃圾堆了
版主: Softfist
#42 Re: 最近学Deep Learning感觉chatgpt写code太爽了,码工可以进历史垃圾堆了
用的多就是什么?
你应该把所有的现代科技都列一列,譬如交流电、电子计算机、电冰箱、微波炉、洗衣机。。。。。。
这并没有阻止这些技术取代人力吧?
#43 Re: 最近学Deep Learning感觉chatgpt写code太爽了,码工可以进历史垃圾堆了
程序是不一样的东西,文科和数学生最容易低估数理逻辑的水深
LittleBear 写了: 2024年 9月 27日 08:25 用的多就是什么?
你应该把所有的现代科技都列一列,譬如交流电、电子计算机、电冰箱、微波炉、洗衣机。。。。。。
这并没有阻止这些技术取代人力吧?
#44 Re: 最近学Deep Learning感觉chatgpt写code太爽了,码工可以进历史垃圾堆了
一样的,都是一样的。
面对现实吧。程序员已经被历史淘汰了,就好比马车夫、洗衣工、打字员、公交车售票员已经被历史淘汰了一样。
多考虑一下退休以后的生活如何安排吧。
#45 Re: 最近学Deep Learning感觉chatgpt写code太爽了,码工可以进历史垃圾堆了
未来10年,一些职业很可能会被淘汰或显著减少,主要原因是自动化、人工智能(AI)和其他技术进步。这些趋势表明,重复性强、规则明确的工作最容易被取代。以下是一些可能会在未来10年内消失或大幅减少的职业:
0,程序员。
未来10年,程序员任务可能会逐渐减少,一些编程任务可能会因为自动化工具(如低代码或无代码平台)的发展而简化,不再需要经典意义上的程序员。只会保留极少数专门研究算法、定制化方案的算法科学家。
1. 电话客服人员
自动化客服系统和人工智能驱动的聊天机器人已经越来越成熟。它们能够回答常见问题并处理客户需求,使得许多电话客服岗位可能被淘汰。
2. 柜台银行员
随着在线银行服务和移动支付的普及,去银行办理日常业务的人数显著减少,传统的银行柜台服务将进一步萎缩。
3. 收银员
自助结账系统和无现金支付手段的兴起,正在减少实体商店中收银员的需求,尤其是在超市和大型零售连锁店。
4. 仓库工人
仓库自动化技术,如机器人和自动分拣系统,正在逐渐取代仓库工人,尤其是在电商行业中。
5. 司机(出租车、卡车司机等)
随着自动驾驶技术的发展,未来卡车司机、出租车司机甚至公交车司机的需求可能会大幅减少,尽管全面推广可能需要更长的时间。
6. 传统工厂工人
工业自动化和机器人技术继续进步,尤其是重复性工作如装配、包装、质量检测等领域,工厂工人的需求将持续下降。
7. 邮递员
虽然快递行业仍在增长,但随着无人机、自动送货车等新技术的兴起,传统的邮递员数量可能减少,尤其是在大城市和乡村地区。
8. 会计和簿记员
自动化财务软件和AI驱动的会计系统能够处理大量的日常财务工作,如税务报表、预算编制等,许多基础级别的会计和簿记工作可能被淘汰。
0,程序员。
未来10年,程序员任务可能会逐渐减少,一些编程任务可能会因为自动化工具(如低代码或无代码平台)的发展而简化,不再需要经典意义上的程序员。只会保留极少数专门研究算法、定制化方案的算法科学家。
1. 电话客服人员
自动化客服系统和人工智能驱动的聊天机器人已经越来越成熟。它们能够回答常见问题并处理客户需求,使得许多电话客服岗位可能被淘汰。
2. 柜台银行员
随着在线银行服务和移动支付的普及,去银行办理日常业务的人数显著减少,传统的银行柜台服务将进一步萎缩。
3. 收银员
自助结账系统和无现金支付手段的兴起,正在减少实体商店中收银员的需求,尤其是在超市和大型零售连锁店。
4. 仓库工人
仓库自动化技术,如机器人和自动分拣系统,正在逐渐取代仓库工人,尤其是在电商行业中。
5. 司机(出租车、卡车司机等)
随着自动驾驶技术的发展,未来卡车司机、出租车司机甚至公交车司机的需求可能会大幅减少,尽管全面推广可能需要更长的时间。
6. 传统工厂工人
工业自动化和机器人技术继续进步,尤其是重复性工作如装配、包装、质量检测等领域,工厂工人的需求将持续下降。
7. 邮递员
虽然快递行业仍在增长,但随着无人机、自动送货车等新技术的兴起,传统的邮递员数量可能减少,尤其是在大城市和乡村地区。
8. 会计和簿记员
自动化财务软件和AI驱动的会计系统能够处理大量的日常财务工作,如税务报表、预算编制等,许多基础级别的会计和簿记工作可能被淘汰。
#46 Re: 最近学Deep Learning感觉chatgpt写code太爽了,码工可以进历史垃圾堆了
你肯定是文科
LittleBear 写了: 2024年 9月 27日 08:31 一样的,都是一样的。
面对现实吧。程序员已经被历史淘汰了,就好比马车夫、洗衣工、打字员、公交车售票员已经被历史淘汰了一样。
多考虑一下退休以后的生活如何安排吧。
#48 Re: 最近学Deep Learning感觉chatgpt写code太爽了,码工可以进历史垃圾堆了
这种小儿科,文科大妈就能写。你让chatgpt写个能超越MATLAB效率的cuda矩阵乘法,或者设计个超越deepspeed之类的流水并行看看?
LittleBear 写了: 2024年 9月 27日 02:16 Certainly! Below is a simple example of a CUDA program written in **CUDA C**. The program performs a basic operation of adding two arrays (vectors) element by element on the **GPU**.
### Example: CUDA Program to Add Two Vectors
```cpp
#include <iostream>
#include <cuda_runtime.h>
// CUDA Kernel to add elements of two arrays
__global__ void vectorAdd(const int* A, const int* B, int* C, int N) {
int idx = threadIdx.x + blockIdx.x * blockDim.x;
if (idx < N) {
C[idx] = A[idx] + B[idx];
}
}
int main() {
// Number of elements in arrays
int N = 1000;
// Size of the arrays in bytes
size_t size = N * sizeof(int);
// Allocate memory on the host (CPU)
int* h_A = (int*)malloc(size);
int* h_B = (int*)malloc(size);
int* h_C = (int*)malloc(size);
// Initialize arrays on the host
for (int i = 0; i < N; ++i) {
h_A = i;
h_B = i * 2;
}
// Allocate memory on the device (GPU)
int* d_A;
int* d_B;
int* d_C;
cudaMalloc(&d_A, size);
cudaMalloc(&d_B, size);
cudaMalloc(&d_C, size);
// Copy arrays from host to device
cudaMemcpy(d_A, h_A, size, cudaMemcpyHostToDevice);
cudaMemcpy(d_B, h_B, size, cudaMemcpyHostToDevice);
// Define the number of threads and blocks
int threadsPerBlock = 256;
int blocksPerGrid = (N + threadsPerBlock - 1) / threadsPerBlock;
// Launch the CUDA kernel
vectorAdd<<<blocksPerGrid, threadsPerBlock>>>(d_A, d_B, d_C, N);
// Copy result from device to host
cudaMemcpy(h_C, d_C, size, cudaMemcpyDeviceToHost);
// Verify the result
for (int i = 0; i < N; ++i) {
if (h_C != h_A + h_B) {
std::cerr << "Error at index " << i << std::endl;
break;
}
}
// Free memory on device and host
cudaFree(d_A);
cudaFree(d_B);
cudaFree(d_C);
free(h_A);
free(h_B);
free(h_C);
std::cout << "Vector addition completed successfully!" << std::endl;
return 0;
}
```
### Explanation of the Code:
1. **CUDA Kernel Function (`vectorAdd`)**:
- This function is executed on the GPU. The `__global__` keyword indicates that the function runs on the device (GPU) and can be called from the host (CPU).
- Each thread computes one element of the result by adding corresponding elements of arrays `A` and `B` and storing the result in array `C`.
2. **Host Code**:
- The CPU initializes the arrays `A` and `B` and allocates memory for the arrays `A`, `B`, and `C` on the GPU.
- The `cudaMalloc()` function allocates memory on the GPU, and `cudaMemcpy()` transfers data between host and device memory.
- The kernel `vectorAdd<<<blocksPerGrid, threadsPerBlock>>>` is launched, with each thread handling one element of the arrays.
3. **Threads and Blocks**:
- The number of threads per block is set to 256, and the number of blocks is calculated to ensure all elements are covered.
- The `threadIdx.x` gives the index of the thread within the block, and `blockIdx.x` gives the index of the block.
4. **Memory Management**:
- After the computation is completed, the result is copied back from the GPU to the CPU, and memory is freed on both the CPU and GPU.
### How to Compile and Run the Code:
To compile and run this CUDA program, you need to have an NVIDIA GPU with CUDA installed. You can use `nvcc`, the CUDA compiler, to compile the code:
```bash
nvcc vector_add.cu -o vector_add
./vector_add
```
If everything is set up correctly, the program will output "Vector addition completed successfully!" after performing the addition on the GPU.
Let me know if you need further clarifications or modifications!